diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-07-09 17:44:21 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-07-09 17:44:21 -0700 |
commit | 2850da733d35b4b21aff914f3565ca3d870c9f37 (patch) | |
tree | c789e92bd957716fa0245ddefe47b983ba47f875 | |
parent | 91bc51889577458d17fd68cd892bf1f4da0f705e (diff) | |
download | nasm-2850da733d35b4b21aff914f3565ca3d870c9f37.tar.gz |
vsnprintf.c: fix printing of a size_t variable
printf("%d", <size_t>) is invalid. As this is for legacy compilers,
don't rely on %zu but rather cast to unsigned long long.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r-- | stdlib/vsnprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/vsnprintf.c b/stdlib/vsnprintf.c index 284cc194..58de6515 100644 --- a/stdlib/vsnprintf.c +++ b/stdlib/vsnprintf.c @@ -22,8 +22,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap) int rv, bytes; if (size > BUFFER_SIZE) { - nasm_panic("vsnprintf: size (%d) > BUFFER_SIZE (%d)", - size, BUFFER_SIZE); + nasm_panic("vsnprintf: size (%llu) > BUFFER_SIZE (%d)", + (unsigned long long)size, BUFFER_SIZE); size = BUFFER_SIZE; } |