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 0e88c4b514ad62b6ac3d0cb7a83bfd338e2883d0..bf1146a4315b046ea6a68b13d9969307a90b9242 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index 968835a1e7d5a704ae5a330ecda091b78851f73c..e85865ced747b3935c2eeec000b36f76183419f6 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.  */