summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-09-30 10:02:35 -0400
committerLinus Groh <mail@linusgroh.de>2021-09-30 15:38:43 +0100
commit94d0562569e89e728e0af4cd2c0710ed9e3d4885 (patch)
tree449b069d8623242dcafbe97148194b152800660b /Kernel
parentd0c1db5efc88a75a9060208b3196b089afec8baf (diff)
downloadserenity-94d0562569e89e728e0af4cd2c0710ed9e3d4885.zip
Kernel: Make UART::print_num(0) work on aarch64
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Prekernel/Arch/aarch64/UART.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Prekernel/Arch/aarch64/UART.h b/Kernel/Prekernel/Arch/aarch64/UART.h
index 1533924b0e..f20a5cdf10 100644
--- a/Kernel/Prekernel/Arch/aarch64/UART.h
+++ b/Kernel/Prekernel/Arch/aarch64/UART.h
@@ -30,10 +30,10 @@ public:
{
char buf[11];
int i = 0;
- while (n) {
+ do {
buf[i++] = (n % 10) + '0';
n /= 10;
- }
+ } while (n);
for (i--; i >= 0; i--)
send(buf[i]);
}