1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 00:10:27 +00:00

Merge pull request #1167 from zevv/janet-formatbf-fix

Fix janet_formatbv() type when handling %d %u int specifiers
This commit is contained in:
Calvin Rose 2023-05-29 18:03:13 -05:00 committed by GitHub
commit dbb2187425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}