diff options
Diffstat (limited to 'lib/printf.c')
-rw-r--r-- | lib/printf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/printf.c b/lib/printf.c index 8e6ec76..a8259ab 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -289,10 +289,9 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args) if (qualifier == 'l') num = va_arg(args, unsigned long); else if (qualifier == 'h') { + num = (unsigned short) va_arg(args, int); if (flags & SIGN) - num = va_arg(args, short); - else - num = va_arg(args, unsigned short); + num = (short) num; } else if (flags & SIGN) num = va_arg(args, int); else |