Fix negative number printing in kprint

This commit is contained in:
Bananymous 2022-11-16 20:27:22 +02:00
parent 20f7c18988
commit 4ebd0e5c36
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ static void kprint_signed(T value)
if (value < 0)
{
sign = true;
*(--ptr) = ((value % 10 + 10) % 10) + '0';
value /= 10;
*(--ptr) = ((10 - (value % 10)) % 10) + '0';
value = -(value / 10);
}
while (value)