Skip to content

Commit

Permalink
vsv: do not ignore empty fields in first row (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Feb 11, 2025
1 parent 7168776 commit b9ba442
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vsv/extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ static char* vsv_read_one_field(VsvReader* p) {
}
if (p->z) {
p->z[p->n] = 0;
} else {
// p->z is initially NULL, so if the content row starts with empty fields,
// we need to set p->z to an empty string (see issue #139).
vsv_append(p, 0);
}
p->bNotFirst = 1;
return p->z;
Expand Down

0 comments on commit b9ba442

Please sign in to comment.