diff options
Diffstat (limited to 'common/printf.c')
-rw-r--r-- | common/printf.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/printf.c b/common/printf.c index 4da70653ee..3c7bc5feca 100644 --- a/common/printf.c +++ b/common/printf.c @@ -223,9 +223,17 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context, int ptrspec; void *ptrval; - /* Handle length */ + /* + * Handle length: + * %l - long + * %z - size_t + */ if (c == 'l') { flags |= PF_64BIT; + } else if (c == 'z') { + if (sizeof(size_t) == sizeof(uint64_t)) + flags |= PF_64BIT; + c = *format++; } |