From bb477f9fd4a69bac77c70d2099272ee1ac17e62c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 17 Apr 2012 21:17:19 -0400 Subject: [PATCH] fix failure of int parser to unget an initial mismatching character --- src/internal/intscan.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.25.1