diff --git a/Src/loadelf.c b/Src/loadelf.c index e10652c0..f624a6a4 100644 --- a/Src/loadelf.c +++ b/Src/loadelf.c @@ -724,8 +724,9 @@ static bool _loadSource( struct symbol *p ) if ( l ) { - *r++ = 0; - l--; + /* Back up to newline and replace it with \0 */ + r--; + *r++ = '\0'; } } }