From d42334af6ce5f50562c11b8bd601867b90fc8f29 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Sat, 1 Nov 2014 11:15:42 +0330 Subject: [PATCH] stdio: fix reading integer length modifiers --- stdio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdio.c b/stdio.c index 43c494d..2549dc0 100644 --- a/stdio.c +++ b/stdio.c @@ -157,13 +157,13 @@ int vfprintf(FILE *fp, char *fmt, va_list ap) psign = 1; s++; } - while (*fmt == 'l') { + while (*s == 'l') { bytes = sizeof(long); - fmt++; + s++; } - while (*fmt == 'h') { + while (*s == 'h') { bytes = bytes < sizeof(int) ? sizeof(char) : sizeof(short); - fmt++; + s++; } switch ((c = *s++)) { case 'd': -- 2.11.4.GIT