Skip to content

Commit 7ba3e24

Browse files
Add comment to explain the reasoning to set char_count to 0
1 parent bcebeba commit 7ba3e24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_libs/src/parser/tokenizer.c

+2
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,8 @@ int parser_consume_rows(parser_t *self, size_t nrows) {
11931193
char_count = (self->word_starts[word_deletions - 1] +
11941194
strlen(self->words[word_deletions - 1]) + 1);
11951195
} else {
1196+
/* if word_deletions == 0 (i.e. this case) then char_count must
1197+
* be 0 too, as no data needs to be skipped */
11961198
char_count = 0;
11971199
}
11981200

0 commit comments

Comments
 (0)