diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-03-07 05:05:00 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-03-07 05:05:00 +0100 |
commit | a0688d29102539f8bc0f5b412683bf3d899d85c0 (patch) | |
tree | 4a8d1d81d999dfec2a0b15e4811ddc92f674fbcc /code | |
parent | 69b151fc3564ffa7dc2ddaad495cfbf4a19dbb5d (diff) |
fixed sbrk
Diffstat (limited to 'code')
-rw-r--r-- | code/fe310/gloss/sys_sbrk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/code/fe310/gloss/sys_sbrk.c b/code/fe310/gloss/sys_sbrk.c index cc01c8f..ce10c90 100644 --- a/code/fe310/gloss/sys_sbrk.c +++ b/code/fe310/gloss/sys_sbrk.c @@ -28,10 +28,9 @@ _sbrk(ptrdiff_t incr) } /* Don't move the break past the end of the heap */ - if ((brk + incr) < &metal_segment_heap_target_end) { + if ((brk + incr) <= &metal_segment_heap_target_end) { brk += incr; } else { - brk = &metal_segment_heap_target_end; return (void *)-1; } |