forked from Imagelibrary/rtems
Initialize the string before replacing characters
This commit is contained in:
committed by
Sebastian Huber
parent
df533f10c0
commit
2f0d5e453b
@@ -545,6 +545,7 @@ convert_TI_records(
|
||||
|
||||
while ( ! endrecord && (fgets(buff, sizeof(buff), ifp)))
|
||||
{
|
||||
p = &buff[0];
|
||||
if (p[strlen(p)-1] == '\n') /* get rid of newline */
|
||||
p[strlen(p)-1] = '\0';
|
||||
|
||||
@@ -553,7 +554,6 @@ convert_TI_records(
|
||||
|
||||
tb.dl_count = 0;
|
||||
|
||||
p = &buff[0];
|
||||
eol = FALSE;
|
||||
while ( ! eol && ! endrecord)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user