diff --git a/base/src/base/console/console.cc b/base/src/base/console/console.cc index c9c6f19b88..f1388d8e3b 100644 --- a/base/src/base/console/console.cc +++ b/base/src/base/console/console.cc @@ -275,7 +275,8 @@ void Console::vprintf(const char *format, va_list list) case Format_command::LONG: - numeric_arg = va_arg(list, long); + numeric_arg = (cmd.type == Format_command::UINT) ? + va_arg(list, unsigned long) : va_arg(list, long); break; case Format_command::SIZE_T: @@ -285,7 +286,8 @@ void Console::vprintf(const char *format, va_list list) case Format_command::DEFAULT: - numeric_arg = va_arg(list, int); + numeric_arg = (cmd.type == Format_command::UINT) ? + va_arg(list, unsigned int) : va_arg(list, int); break; } }