diff options
author | Michael Brown | 2006-05-14 13:55:30 +0200 |
---|---|---|
committer | Michael Brown | 2006-05-14 13:55:30 +0200 |
commit | eb6b8e8d70c34444be634355cda1808f5632a2d6 (patch) | |
tree | 5e0ff4c4e0e4ef7bf798b21719164b46fa3cb3d5 /src/core/vsprintf.c | |
parent | Correctly handle zero-length buffers. (diff) | |
download | ipxe-eb6b8e8d70c34444be634355cda1808f5632a2d6.tar.gz ipxe-eb6b8e8d70c34444be634355cda1808f5632a2d6.tar.xz ipxe-eb6b8e8d70c34444be634355cda1808f5632a2d6.zip |
Handle the '"%c", 0' case correctly.
Diffstat (limited to 'src/core/vsprintf.c')
-rw-r--r-- | src/core/vsprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
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' ) { |