Skip to content

Commit c7fc292

Browse files
committed
fix: don't flag int with trailing whitespace as invalid
1 parent 4ff07e3 commit c7fc292

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/_libs/src/parser/tokenizer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,10 @@ static inline void check_for_invalid_char(const char *p_item, int *error) {
18391839
p_item++;
18401840
}
18411841

1842+
while (*p_item != '\0' && isspace_ascii(*p_item)) {
1843+
++p_item;
1844+
}
1845+
18421846
// check if reached the end of string after consuming all digits
18431847
if (*p_item != '\0') {
18441848
*error = ERROR_INVALID_CHARS;

0 commit comments

Comments
 (0)