From: Rich Felker Date: Wed, 18 Apr 2012 01:17:19 +0000 (-0400) Subject: fix failure of int parser to unget an initial mismatching character X-Git-Tag: v0.8.8~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bb477f9fd4a69bac77c70d2099272ee1ac17e62c;p=oweals%2Fmusl.git fix failure of int parser to unget an initial mismatching character --- diff --git a/src/internal/intscan.c b/src/internal/intscan.c index a00f2ccc..d65fc45c 100644 --- a/src/internal/intscan.c +++ b/src/internal/intscan.c @@ -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;