From 01d2a7858e322d0586f9ef963856b46ade26977b Mon Sep 17 00:00:00 2001 From: David Schultz Date: Sun, 22 Apr 2012 21:22:14 +0000 Subject: [PATCH] Bugfix: %n doesn't count as a conversion, so sscanf("abc", "ab%ncd", &i) returns EOF, not 0. --- lib/libc/stdio/vfscanf.c | 1 - lib/libc/stdio/vfwscanf.c | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index 9b8b1b2359d9..f9b7e55a57d8 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -703,7 +703,6 @@ again: c = *fmt++; break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index 79368e7efd39..f71567246b20 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -650,7 +650,6 @@ again: c = *fmt++; break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT)