diff --git a/src/kprint/kvprintf.c b/src/kprint/kvprintf.c index 0cc7d22..29da473 100644 --- a/src/kprint/kvprintf.c +++ b/src/kprint/kvprintf.c @@ -5,7 +5,7 @@ #include #include -int print_int_base(int32_t number, const char *prefix, const char *base); +int print_int_base(int64_t number, const char *prefix, const char *base); static int get_level(const char *str) { @@ -20,17 +20,17 @@ static int print_flag(char flag, va_list *ap) case '%': return terminal_putchar('%'); case 'i': - return print_int_base(va_arg(*ap, int), NULL, BASE_DECA); + return print_int_base(va_arg(*ap, int32_t), NULL, BASE_DECA); case 'd': - return print_int_base(va_arg(*ap, int), NULL, BASE_DECA); + return print_int_base(va_arg(*ap, int32_t), NULL, BASE_DECA); case 'c': return terminal_putchar(va_arg(*ap, int)); case 's': return terminal_writestring(va_arg(*ap, char *)); case 'p': - return print_int_base(va_arg(*ap, int), "0x", BASE_HEXA); + return print_int_base(va_arg(*ap, uint32_t), "0x", BASE_HEXA); case 'x': - return print_int_base(va_arg(*ap, int), "0x", BASE_HEXA); + return print_int_base(va_arg(*ap, int32_t), "0x", BASE_HEXA); case 'u': return print_int_base(va_arg(*ap, uint32_t), NULL, BASE_DECA); } diff --git a/src/kprint/print_int_base.c b/src/kprint/print_int_base.c index e285827..59dd345 100644 --- a/src/kprint/print_int_base.c +++ b/src/kprint/print_int_base.c @@ -3,7 +3,7 @@ #include "string.h" #include "terminal.h" -int print_int_base(int32_t number, const char *prefix, const char *base) +int print_int_base(int64_t number, const char *prefix, const char *base) { const int base_size = strlen(base); uint64_t div = 1;