From 8b94c67502193bbcfbeab34ca44c6c63cdb8f412 Mon Sep 17 00:00:00 2001 From: ice-bit Date: Fri, 20 Sep 2019 11:50:01 +0200 Subject: [PATCH] Fixed a bug within kprint_dec function(tty.c) --- kernel/drivers/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/drivers/tty.c b/kernel/drivers/tty.c index f671e8f..1fe306d 100644 --- a/kernel/drivers/tty.c +++ b/kernel/drivers/tty.c @@ -71,13 +71,13 @@ void kprint(uint8_t *buf) { void kprint_dec(uint32_t num) { if(num == 0) { - const uint8_t buf = (uint8_t)'0'; + uint8_t *buf = (uint8_t*)'0'; kprint_c(buf, strlen(buf), WHITE, BLACK);; return; } int32_t acc = num; uint8_t c[32]; - uint32_t i = 0; + int32_t i = 0; while(acc > 0) { c[i] = '0' + acc%10; acc /= 10;