]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(process_string_arg): Correctly handle zero precision with wide character
authorUlrich Drepper <drepper@redhat.com>
Fri, 14 Dec 2001 07:15:10 +0000 (07:15 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 14 Dec 2001 07:15:10 +0000 (07:15 +0000)
string format.

stdio-common/vfprintf.c

index c5e78c74999562cce94ede26aeabd25c17fd6c7d..febd094729031fa730d83f582c6f8e2abccb66b8 100644 (file)
@@ -1195,7 +1195,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
                                                                              \
            memset (&mbstate, '\0', sizeof (mbstate_t));                      \
                                                                              \
-           if (prec > 0)                                                     \
+           if (prec >= 0)                                                    \
              {                                                               \
                /* The string `s2' might not be NUL terminated.  */           \
                if (prec < 32768                                              \