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 Corinna Vinschen
parent 754386c7f5
commit d72ea86d41
1 changed files with 2 additions and 2 deletions

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 ();
}