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 a837ed62b66a5709e38cde09419cf4262d9410b1..6287f40a698c5a7c7d83d3e7c8aedc564463e313 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 00b8c63b0109064257407dc94d9fe49ed6855a0b..497891466239c9078089c1d9c813d14e8ae86a01 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 229693d27921a1758ced80f0a4c5e3345389a307..de7fc49b6fbc17d79196cdd59b6eac099ba63624 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;