(process_string_arg): Correct last patch and write correct number of bytes
authordrepper <drepper>
Tue, 17 Aug 1999 15:58:26 +0000 (15:58 +0000)
committerdrepper <drepper>
Tue, 17 Aug 1999 15:58:26 +0000 (15:58 +0000)
in case of %ls with precision.

stdio-common/vfprintf.c

index 780ac76..d45e7d9 100644 (file)
@@ -1109,8 +1109,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                                                              \
              {                                                               \