]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(process_arg): Correct last patch and write correct number of bytes
authorUlrich Drepper <drepper@redhat.com>
Tue, 17 Aug 1999 16:01:02 +0000 (16:01 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 17 Aug 1999 16:01:02 +0000 (16:01 +0000)
in case of %ls with precision.

stdio-common/vfprintf.c

index bc66393a366221b0da91dc35afba358a2a98b23f..3249911cc7e8073560eeed9348ea0ba844b0c8c6 100644 (file)
@@ -919,8 +919,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
            if (prec > 0)                                                     \
              {                                                               \
                /* The string `s2' might not be NUL terminated.  */           \
-               string = (char *) alloca (prec + 1);                          \
-               len = __wcsrtombs (string, &s2, prec + 1, &mbstate);          \
+               string = (char *) alloca (prec);                              \
+               len = __wcsrtombs (string, &s2, prec, &mbstate);              \
              }                                                               \
            else                                                              \
              {                                                               \