Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Aug 8, 2024
1 parent bce0d0f commit cab04ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/g2ccsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,12 @@ g2c_csv_init()
return G2C_ECSV;

/* Skip header line */
fgets(line,max_line_size,doc);
buf = fgets(line,max_line_size,doc);

/* Go through the document and save table data.
* Each line is a table of codes. */
while((fgets(line,max_line_size,doc)) != NULL)
while((buf = fgets(line,max_line_size,doc)) != NULL)
{
buf = strdup(line);
i = 0;
while(buf != NULL && i < num_columns)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/tst_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ main()
return G2C_ERROR;

/* Calling init again is harmless. */
if (g2c_xml_init())
if (g2c_csv_init())
return G2C_ERROR;

g2c_free_tables();
Expand Down

0 comments on commit cab04ef

Please sign in to comment.