From eb6b8e8d70c34444be634355cda1808f5632a2d6 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 14 May 2006 11:55:30 +0000 Subject: [PATCH] Handle the '"%c", 0' case correctly. --- src/core/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/vsprintf.c b/src/core/vsprintf.c index 481ca26d..a8f7af61 100644 --- a/src/core/vsprintf.c +++ b/src/core/vsprintf.c @@ -228,7 +228,7 @@ size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) { ptr = tmp_buf + sizeof ( tmp_buf ) - 1; *ptr = '\0'; if ( *fmt == 'c' ) { - *(--ptr) = va_arg ( args, unsigned int ); + ctx->handler ( ctx, va_arg ( args, unsigned int ) ); } else if ( *fmt == 's' ) { ptr = va_arg ( args, char * ); } else if ( *fmt == 'p' ) {