Skip to content

Commit 4a090fb

Browse files
rsj123Rbb666
authored andcommitted
fix(klibc): fix incorrect %hh format output for values in [0x80, 0xff]
1 parent d9c4424 commit 4a090fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/klibc/rt_vsnprintf_tiny.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ int rt_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
560560
}
561561
else if (qualifier == 'H')
562562
{
563-
num = (rt_int8_t)va_arg(args, rt_int32_t);
563+
num = (rt_uint8_t)va_arg(args, rt_int32_t);
564564
if (flags & SIGN)
565565
{
566566
num = (rt_int8_t)num;

0 commit comments

Comments
 (0)