From 5456408b8466470b135a0fc96dbc63a925244100 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 28 Apr 2005 18:26:08 +0000 Subject: [PATCH] 2005-04-28 Jeff Johnston * libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko when checking for multiple flags. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdio/vfscanf.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 1e8d8c3f5..e6a46ad93 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2005-04-28 Jeff Johnston + + * libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko + when checking for multiple flags. + 2005-04-18 Hans-Peter Nilsson * configure.host : Set 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; -- 2.43.5