mirror of https://github.com/l4ka/pistachio.git
Fix printing of 64-bit decimal values specified by "%lld" in format
identifier.
This commit is contained in:
parent
0737eccd40
commit
1ae3d58bff
|
@ -341,13 +341,23 @@ int SECTION(SEC_KDEBUG) do_printf(const char* format_p, va_list args)
|
|||
}
|
||||
case 'd':
|
||||
{
|
||||
long val = arg(long);
|
||||
if (val < 0)
|
||||
{
|
||||
putc('-');
|
||||
val = -val;
|
||||
}
|
||||
n += print_dec(val, width, nullpad ? '0' : ' ');
|
||||
if (longs < 2) {
|
||||
long val = arg(long);
|
||||
if (val < 0)
|
||||
{
|
||||
putc('-');
|
||||
val = -val;
|
||||
}
|
||||
n += print_dec(val, width, nullpad ? '0' : ' ');
|
||||
} else {
|
||||
u64_t val = arg(u64_t);
|
||||
if (val < 0)
|
||||
{
|
||||
putc('-');
|
||||
val = -val;
|
||||
}
|
||||
n += print_dec64(val, width, nullpad ? '0' : ' ');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'u':
|
||||
|
|
Loading…
Reference in New Issue