From 234a74b6e82b5ddbf7bc4aafa2fb3ce5a0b7c3f3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 11 Jun 2007 22:24:31 +0000 Subject: [PATCH] Fix small mistake, reported by Eric Blake. --- ChangeLog | 6 ++++++ lib/printf-args.c | 6 +++--- lib/printf-parse.h | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a837ed62b..6287f40a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-11 Bruno Haible + + * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL + replacement string. + Reported by Eric Blake. + 2007-06-10 Bruno Haible Prepare vasnprintf code for use with Unicode strings. diff --git a/lib/printf-args.c b/lib/printf-args.c index 00b8c63b0..497891466 100644 --- a/lib/printf-args.c +++ b/lib/printf-args.c @@ -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; diff --git a/lib/printf-parse.h b/lib/printf-parse.h index 229693d27..de7fc49b6 100644 --- a/lib/printf-parse.h +++ b/lib/printf-parse.h @@ -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; -- 2.11.0