From: Alan Cox Date: Sat, 16 May 2015 19:10:23 +0000 (+0100) Subject: setbrk: but don't wipe shrinks of the stack! X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a8bb80622894077537ef88b1dab0e80c62cc3984;p=FUZIX.git setbrk: but don't wipe shrinks of the stack! --- diff --git a/Applications/V7/cmd/sh/setbrk.c b/Applications/V7/cmd/sh/setbrk.c index fe1b31a7..14a58b0f 100644 --- a/Applications/V7/cmd/sh/setbrk.c +++ b/Applications/V7/cmd/sh/setbrk.c @@ -16,7 +16,7 @@ void *setbrk(intptr_t incr) { uint8_t *a = sbrk(incr); brkend = a + incr; - if (a != (uint8_t *)-1) + if (a != (uint8_t *)-1 && incr > 0) memset(a, 0, incr); return a; }