From 6d8a9ea7225b228f05cd6bc87165579d38d1994d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 17 Nov 2000 17:09:06 +0000 Subject: Some cleanups from Manuel Novoa III , and a bit of extra cleanup in the test makefiles. --- libc/stdio/scanf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libc/stdio/scanf.c') diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 51d30cdde..2962125b4 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -201,15 +201,16 @@ va_list ap; strcpy(delim, "\011\012\013\014\015 "); strcpy(digits, "0123456789ABCDEF"); - if (fmt[1] == '*') { + if (*++fmt == '*') { endnull = store = 0; ++fmt; } - while (isdigit(*++fmt)) { /* width digit(s) */ + while (isdigit(*fmt)) { /* width digit(s) */ if (width == -1) width = 0; wide1 = width = (width * 10) + (*fmt - '0'); + ++fmt; } --fmt; fmtnxt: -- cgit v1.2.3