Initialize the string before replacing characters

This commit is contained in:
Cynthia Rempel
2013-08-25 18:00:31 -07:00
committed by Sebastian Huber
parent df533f10c0
commit 2f0d5e453b

View File

@@ -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)
{