From 1994399448a298d3fc5474b3ca6272e1c699c7df Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 1 Nov 2019 13:13:40 +0100 Subject: Fixed VGA buffer logging --- src/kernel/io/io.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/kernel/io') diff --git a/src/kernel/io/io.c b/src/kernel/io/io.c index 974c391..acbe3dc 100644 --- a/src/kernel/io/io.c +++ b/src/kernel/io/io.c @@ -88,19 +88,6 @@ void serial_write_hex(int n) { } void serial_write_dec(int n) { - if (n == 0) serial_put('0'); - int acc = n; - char c[32]; - int i = 0; - while (acc > 0) { - c[i] = '0' + acc % 10; - acc /= 10; - i++; - } - c[i] = 0; - static char c2[32]; - c2[i--] = 0; - int j = 0; - while (i >= 0) c2[i--] = c[j++]; - serial_write(c2); + char string[16]; + serial_write(itoa(n, string)); } -- cgit v1.2.3