]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(process_arg): Fix decimal format with 'h' flag and positional arg.
authorUlrich Drepper <drepper@redhat.com>
Wed, 13 Mar 2002 23:17:24 +0000 (23:17 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 13 Mar 2002 23:17:24 +0000 (23:17 +0000)
stdio-common/vfprintf.c

index febd094729031fa730d83f582c6f8e2abccb66b8..fd759208f8f33f1c0a0c39cda08cc382169eb64c 100644 (file)
@@ -580,8 +580,10 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
          else                                                                \
            if (is_long_num)                                                  \
              signed_number = args_value[fspec->data_arg].pa_long_int;        \
-           else                                                              \
+           else if (!is_short)                                               \
              signed_number = args_value[fspec->data_arg].pa_int;             \
+           else                                                              \
+             signed_number = args_value[fspec->data_arg].pa_short_int;       \
                                                                              \
          is_negative = signed_number < 0;                                    \
          number.word = is_negative ? (- signed_number) : signed_number;      \