diff --git a/Kernel/Prekernel/Arch/aarch64/UART.h b/Kernel/Prekernel/Arch/aarch64/UART.h index 1533924b0ee..f20a5cdf10c 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]); }