diff options
author | Martin Mares <mj@ucw.cz> | 1998-11-21 10:25:34 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-11-21 10:25:34 +0000 |
commit | 4254dc45e77b4c2d45178c7a5ce1e9bff19b8bf7 (patch) | |
tree | 3d53a9dbede56e28f8ff60199163697d97fa2ce8 | |
parent | 9158ca99f740d5b1b50d233e0f64e61504dc6fdf (diff) |
Killed bug in processing of 'h' prefix. Patch taken from linux-2.1.129.
-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 8e6ec76e..a8259ab5 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 |