summaryrefslogtreecommitdiff
path: root/src/stdio/vfwscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/vfwscanf.c')
-rw-r--r--src/stdio/vfwscanf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c
index a52ba3a0..dbba8652 100644
--- a/src/stdio/vfwscanf.c
+++ b/src/stdio/vfwscanf.c
@@ -264,7 +264,9 @@ int vfwscanf(FILE *f, const wchar_t *fmt, va_list ap)
}
if (width) ungetwc(c, f);
- if (!gotmatch) goto match_fail;
+ if (!gotmatch)
+ if (c>=0) goto match_fail;
+ else goto input_fail;
if (*p==']') p++;
while (*p!=']') {