[PATCH 1/2] _scanf.c: fix bug introduced with 'm' modifier patch

Pirmin Walthert infos at nappsoft.com
Thu Apr 4 21:34:26 UTC 2013


From: root <root at yarc.(none)>

Fixes a bug introduced with e567c399ff86d007d8c4586f0dd5e0ca61e283ca.
As "i" is already used in a different loop, it needs to be reset.

Signed-off-by: Pirmin Walthert <infos at nappsoft.com>
---
 libc/stdio/_scanf.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c
index e0af486..fe33386 100644
--- a/libc/stdio/_scanf.c
+++ b/libc/stdio/_scanf.c
@@ -1457,6 +1457,7 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg)
 					}
 #endif /* __UCLIBC_HAS_WCHAR__ */
 
+					i = 0;
 
 					while (__scan_getc(&sc) >= 0) {
 						zero_conversions = 0;
-- 
1.7.10.4



More information about the uClibc mailing list