From e64a0175b10b02f75cd9f8ccea3f7bab0a27dd55 Mon Sep 17 00:00:00 2001 From: Ico Doornekamp Date: Mon, 29 May 2023 19:50:14 +0200 Subject: [PATCH] change janet_formatbv() to handle int/unsigned int instead of long/unsigned long on '%d' and '%u' format specifiers. --- src/core/pp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/pp.c b/src/core/pp.c index f5fc6f9d4..abeb7ce38 100644 --- a/src/core/pp.c +++ b/src/core/pp.c @@ -846,7 +846,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) { } case 'd': case 'i': { - int64_t n = va_arg(args, long); + int64_t n = va_arg(args, int); nb = snprintf(item, MAX_ITEM, form, n); break; } @@ -854,7 +854,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) { case 'X': case 'o': case 'u': { - uint64_t n = va_arg(args, unsigned long); + uint64_t n = va_arg(args, unsigned int); nb = snprintf(item, MAX_ITEM, form, n); break; }