mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
change janet_formatbv() to handle int/unsigned int instead of long/unsigned long on '%d' and '%u' format specifiers.
This commit is contained in:
parent
70f13f1b62
commit
e64a0175b1
@ -846,7 +846,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
|
|||||||
}
|
}
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i': {
|
case 'i': {
|
||||||
int64_t n = va_arg(args, long);
|
int64_t n = va_arg(args, int);
|
||||||
nb = snprintf(item, MAX_ITEM, form, n);
|
nb = snprintf(item, MAX_ITEM, form, n);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -854,7 +854,7 @@ void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
|
|||||||
case 'X':
|
case 'X':
|
||||||
case 'o':
|
case 'o':
|
||||||
case 'u': {
|
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);
|
nb = snprintf(item, MAX_ITEM, form, n);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user