1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

Kernel: Make UART::print_num(0) work on aarch64

This commit is contained in:
Nico Weber 2021-09-30 10:02:35 -04:00 committed by Linus Groh
parent d0c1db5efc
commit 94d0562569

View file

@ -30,10 +30,10 @@ public:
{ {
char buf[11]; char buf[11];
int i = 0; int i = 0;
while (n) { do {
buf[i++] = (n % 10) + '0'; buf[i++] = (n % 10) + '0';
n /= 10; n /= 10;
} } while (n);
for (i--; i >= 0; i--) for (i--; i >= 0; i--)
send(buf[i]); send(buf[i]);
} }