Fix small mistake, reported by Eric Blake.
authorBruno Haible <bruno@clisp.org>
Mon, 11 Jun 2007 22:24:31 +0000 (22:24 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 11 Jun 2007 22:24:31 +0000 (22:24 +0000)
ChangeLog
lib/printf-args.c
lib/printf-parse.h

index a837ed6..6287f40 100644 (file)
--- 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.
index 00b8c63..4978914 100644 (file)
@@ -150,7 +150,7 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
        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 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
        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 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
        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;
index 229693d..de7fc49 100644 (file)
@@ -51,7 +51,7 @@ typedef struct
   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 @@ typedef struct
   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 @@ typedef struct
   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 @@ typedef struct
   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;