aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 0412ca66eb..3ca82cc4c7 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1657,9 +1657,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
++f;
}
- tw = (char *) f;
while ((fc = *f++) != '\0' && fc != ']')
- if (fc == '-' && *f != '\0' && *f != ']' && f - 2 != tw
+ if (fc == '-' && *f != '\0' && *f != ']'
&& (unsigned char) f[-2] <= (unsigned char) *f)
{
/* Add all characters from the one before the '-'