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) /* Used to return the pointer to the list */ stock *FirstStockPtr=NULL; line = csv_file; end_line = csv_file; /* do not use the first line */ - end_line = strstr(line, "\n"); + if (!(end_line = strstr(line, "\n"))) + return 0; *end_line = 0; end_line++; line = end_line; while ((end_line = strstr(line, "\n"))) { *end_line = 0; |