diff options
author | Martin Mares <mj@ucw.cz> | 1998-11-21 11:25:34 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-11-21 11:25:34 +0100 |
commit | 4254dc45e77b4c2d45178c7a5ce1e9bff19b8bf7 (patch) | |
tree | 3d53a9dbede56e28f8ff60199163697d97fa2ce8 /lib/printf.c | |
parent | 9158ca99f740d5b1b50d233e0f64e61504dc6fdf (diff) | |
download | bird-4254dc45e77b4c2d45178c7a5ce1e9bff19b8bf7.tar bird-4254dc45e77b4c2d45178c7a5ce1e9bff19b8bf7.zip |
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.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 |