summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdio/vfscanf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index 80c652aba..ae2581a3b 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -1050,7 +1050,8 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
case 'n':
case 'N':
if (nancount == 0
- && (flags & (SIGNOK | NDIGITS | DPTOK | EXPOK)))
+ && (flags & (SIGNOK | NDIGITS | DPTOK | EXPOK)) ==
+ (SIGNOK | NDIGITS | DPTOK | EXPOK))
{
flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS);
nancount = 1;