LibC: printf now prints 0 as integer
This commit is contained in:
parent
fb1bab7c30
commit
1a0fdc5a44
|
@ -54,6 +54,9 @@ static void integer_to_string(char* buffer, T value, int base, bool upper, const
|
|||
value = -(value / base);
|
||||
}
|
||||
|
||||
if (value == 0 && width > 0)
|
||||
buffer[offset++] = '0';
|
||||
|
||||
while (value)
|
||||
{
|
||||
buffer[offset++] = digit_char(value % base, upper);
|
||||
|
|
Loading…
Reference in New Issue