summaryrefslogtreecommitdiff
path: root/lib/printf.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-11-21 10:25:34 +0000
committerMartin Mares <mj@ucw.cz>1998-11-21 10:25:34 +0000
commit4254dc45e77b4c2d45178c7a5ce1e9bff19b8bf7 (patch)
tree3d53a9dbede56e28f8ff60199163697d97fa2ce8 /lib/printf.c
parent9158ca99f740d5b1b50d233e0f64e61504dc6fdf (diff)
Killed bug in processing of 'h' prefix. Patch taken from linux-2.1.129.
Diffstat (limited to 'lib/printf.c')
-rw-r--r--lib/printf.c5
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