changeset 9827:32d08ee66484

Fix a bug in unistdio routines, introduced on 2007-06-10.
author Bruno Haible <bruno@clisp.org>
date Sun, 30 Mar 2008 14:09:00 +0200
parents c421fead68d3
children 60f7d7e296c5
files ChangeLog lib/vasnprintf.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -4553,7 +4553,7 @@
 			      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.  */