4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-02 04:20:28 +08:00

MSP430: Fix message in sbrk.c printing binary character

The call to write() in sbrk.c was using the wrong value for the length
argument, causing the NUL terminating character of the string to be
printed.
This commit is contained in:
Jozef Lawrynowicz 2020-09-02 16:16:55 +01:00 committed by Ken Brown
parent 027cfa4720
commit 44ca43319c

View File

@ -24,8 +24,8 @@ _sbrk (int adj)
if (heap + adj > sp)
{
#define MESSAGE "Heap and stack collision\n"
write (1, MESSAGE, sizeof MESSAGE);
const char * const msg = "Heap and stack collision\n";
write (1, msg, sizeof (msg) - 1);
abort ();
}