summaryrefslogtreecommitdiff
path: root/csv.c
diff options
context:
space:
mode:
Diffstat (limited to 'csv.c')
-rw-r--r--csv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/csv.c b/csv.c
index 52e9bfd..1456d6e 100644
--- a/csv.c
+++ b/csv.c
@@ -257,6 +257,11 @@ csv_read(csv_t *csv, FILE *in)
257 assert(csv != NULL); 257 assert(csv != NULL);
258 assert(in != NULL); 258 assert(in != NULL);
259 259
260 /* initialze if needed... */
261 if ( csv->csv_options == NULL ) {
262 csv_init(csv);
263 }
264
260 /* do not try to read if EOF has already been seen */ 265 /* do not try to read if EOF has already been seen */
261 if ( feof(in) ) { 266 if ( feof(in) ) {
262 csv_cleanup(csv); 267 csv_cleanup(csv);