Sun May 12 22:52:22 1996 Bruce Elliott <belliott@accessone.com>
authorroland <roland>
Mon, 13 May 1996 23:49:35 +0000 (23:49 +0000)
committerroland <roland>
Mon, 13 May 1996 23:49:35 +0000 (23:49 +0000)
* stdio-common/vfprintf.c: Correct handling of unsigned short
values.

stdio-common/vfprintf.c

index 193c392..1643f37 100644 (file)
@@ -495,8 +495,10 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
        {                                                                     \
          if (is_long)                                                        \
            number.word = va_arg (ap, unsigned long int);                     \
+         else if (!is_short)                                                 \
+           number.word = va_arg (ap, unsigned int);                          \
          else                                                                \
-           number.word = va_arg (ap, unsigned int); /* Promoted.  */         \
+           number.word = (unsigned short int) va_arg (ap, unsigned int);     \
                                                                              \
        LABEL (number):                                                       \
          if (prec < 0)                                                       \