Browse Source

Accept '%i' as a synonym for '%d'.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
6e3e5efaed
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/core/vsprintf.c

+ 1
- 1
src/core/vsprintf.c View File

@@ -237,7 +237,7 @@ size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) {
237 237
 				hex = va_arg ( args, unsigned int );
238 238
 			}
239 239
 			ptr = format_hex ( ptr, hex, width, flags );
240
-		} else if ( *fmt == 'd' ) {
240
+		} else if ( ( *fmt == 'd' ) || ( *fmt == 'i' ) ){
241 241
 			signed long decimal;
242 242
 
243 243
 			if ( *length >= sizeof ( signed long ) ) {

Loading…
Cancel
Save