changeset 8974:ad4d14c1737e

Fix small mistake, reported by Eric Blake.
author Bruno Haible <bruno@clisp.org>
date Mon, 11 Jun 2007 22:24:31 +0000
parents 7df86a1985e4
children b70a0b36c501
files ChangeLog lib/printf-args.c lib/printf-parse.h
diffstat 3 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-11  Bruno Haible  <bruno@clisp.org>
+
+	* lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
+	replacement string.
+	Reported by Eric Blake.
+
 2007-06-10  Bruno Haible  <bruno@clisp.org>
 
 	Prepare vasnprintf code for use with Unicode strings.
--- a/lib/printf-args.c
+++ b/lib/printf-args.c
@@ -150,7 +150,7 @@
 	if (ap->a.a_u8_string == NULL)
 	  {
 	    static const uint8_t u8_null_string[] =
-	      { '(', 'N', 'U', 'L', 'L', 0 };
+	      { '(', 'N', 'U', 'L', 'L', ')', 0 };
 	    ap->a.a_u8_string = u8_null_string;
 	  }
 	break;
@@ -162,7 +162,7 @@
 	if (ap->a.a_u16_string == NULL)
 	  {
 	    static const uint16_t u16_null_string[] =
-	      { '(', 'N', 'U', 'L', 'L', 0 };
+	      { '(', 'N', 'U', 'L', 'L', ')', 0 };
 	    ap->a.a_u16_string = u16_null_string;
 	  }
 	break;
@@ -174,7 +174,7 @@
 	if (ap->a.a_u32_string == NULL)
 	  {
 	    static const uint32_t u32_null_string[] =
-	      { '(', 'N', 'U', 'L', 'L', 0 };
+	      { '(', 'N', 'U', 'L', 'L', ')', 0 };
 	    ap->a.a_u32_string = u32_null_string;
 	  }
 	break;
--- a/lib/printf-parse.h
+++ b/lib/printf-parse.h
@@ -51,7 +51,7 @@
   const char* precision_start;
   const char* precision_end;
   size_t precision_arg_index;
-  char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 char_directive;
@@ -80,7 +80,7 @@
   const uint8_t* precision_start;
   const uint8_t* precision_end;
   size_t precision_arg_index;
-  uint8_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u8_directive;
@@ -107,7 +107,7 @@
   const uint16_t* precision_start;
   const uint16_t* precision_end;
   size_t precision_arg_index;
-  uint16_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u16_directive;
@@ -134,7 +134,7 @@
   const uint32_t* precision_start;
   const uint32_t* precision_end;
   size_t precision_arg_index;
-  uint32_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
   size_t arg_index;
 }
 u32_directive;