mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
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>
This commit is contained in:
parent
91bc518895
commit
2850da733d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user