Diffstat (limited to 'noncore/todayplugins/stockticker/libstocks/csv.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/csv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/todayplugins/stockticker/libstocks/csv.c b/noncore/todayplugins/stockticker/libstocks/csv.c index 6170bed..86d8607 100644 --- a/noncore/todayplugins/stockticker/libstocks/csv.c +++ b/noncore/todayplugins/stockticker/libstocks/csv.c | |||
@@ -309,17 +309,18 @@ stock *parse_csv_history_file(char *csv_file) | |||
309 | 309 | ||
310 | /* Used to return the pointer to the list */ | 310 | /* Used to return the pointer to the list */ |
311 | stock *FirstStockPtr=NULL; | 311 | stock *FirstStockPtr=NULL; |
312 | 312 | ||
313 | line = csv_file; | 313 | line = csv_file; |
314 | end_line = csv_file; | 314 | end_line = csv_file; |
315 | 315 | ||
316 | /* do not use the first line */ | 316 | /* do not use the first line */ |
317 | end_line = strstr(line, "\n"); | 317 | if (!(end_line = strstr(line, "\n"))) |
318 | return 0; | ||
318 | *end_line = 0; | 319 | *end_line = 0; |
319 | end_line++; | 320 | end_line++; |
320 | line = end_line; | 321 | line = end_line; |
321 | 322 | ||
322 | while ((end_line = strstr(line, "\n"))) | 323 | while ((end_line = strstr(line, "\n"))) |
323 | { | 324 | { |
324 | *end_line = 0; | 325 | *end_line = 0; |
325 | 326 | ||