diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2020-09-02 16:16:55 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-09-03 12:55:32 +0200 |
commit | d72ea86d41e1295839de8cd9564bb8b44a8d862a (patch) | |
tree | 730ff79929b92265f261cbfb112c02a514d9a7b8 | |
parent | 754386c7f558a686420d4646c101706d9020f5d3 (diff) | |
download | newlib-d72ea86d41e1295839de8cd9564bb8b44a8d862a.zip newlib-d72ea86d41e1295839de8cd9564bb8b44a8d862a.tar.gz newlib-d72ea86d41e1295839de8cd9564bb8b44a8d862a.tar.bz2 |
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.
-rw-r--r-- | libgloss/msp430/sbrk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgloss/msp430/sbrk.c b/libgloss/msp430/sbrk.c index bbc3fb5..8e4339f 100644 --- a/libgloss/msp430/sbrk.c +++ b/libgloss/msp430/sbrk.c @@ -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 (); } |