diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c index c331d81569..3df402d7e9 100644 --- a/libs/libc/stdio/lib_libvsprintf.c +++ b/libs/libc/stdio/lib_libvsprintf.c @@ -1018,7 +1018,11 @@ str_lpad: flags &= ~(FL_NEGATIVE | FL_ALT); if (x < 0) { - x = -x; +#ifndef CONFIG_HAVE_LONG_LONG + x = -(unsigned long)x; +#else + x = -(unsigned long long)x; +#endif flags |= FL_NEGATIVE; }