fix failure of int parser to unget an initial mismatching character
This commit is contained in:
1 parent
99fbf4cfdb
commit
bb477f9fd4
1 file changed
+1
@@ -54,6 +54,7 @@ unsigned long long __intscan(FILE *f, unsigned base, int pok, unsigned long long
|
||||
} else {
|
||||
if (base == 0) base = 10;
|
||||
if (val[c] >= base) {
|
||||
shunget(f);
|
||||
shlim(f, 0);
|
||||
errno = EINVAL;
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user