summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/vfscanf.c3
2 files changed, 7 insertions, 1 deletions
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 <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko
+ when checking for multiple flags.
+
2005-04-18 Hans-Peter Nilsson <hp@axis.com>
* configure.host <cris-*-* | crisv32-*-*>: 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;