Fix a bug in unistdio routines, introduced on 2007-06-10.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Mar 2008 12:09:00 +0000 (14:09 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Mar 2008 12:09:00 +0000 (14:09 +0200)
ChangeLog
lib/vasnprintf.c

index 0e88c4b..bf1146a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-03-30  Bruno Haible  <bruno@clisp.org>
 
+       Fix bug introduced on 2007-06-10.
+       * lib/vasnprintf.c (VASNPRINTF): When performing zero-padding, use
+       spaces instead of 0 digits for 's' also when ENABLE_UNISTDIO.
+
+2008-03-30  Bruno Haible  <bruno@clisp.org>
+
        Improve freadseek's efficiency after ungetc.
        * lib/freadseek.c: Include freadahead.h.
        (freadptrinc): New function, extracted from freadseek.
index 968835a..e85865c 100644 (file)
@@ -4553,7 +4553,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                              DCHAR_T *p = rp + count;
                              DCHAR_T *end = p + pad;
                              DCHAR_T *pad_ptr;
-# if !DCHAR_IS_TCHAR
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
                              if (dp->conversion == 'c'
                                  || dp->conversion == 's')
                                /* No zero-padding for string directives.  */