From 945486c29e3809e905629a4e88dfc2e1da68a051 Mon Sep 17 00:00:00 2001 From: Yunjie Gu Date: Wed, 31 Aug 2022 20:30:59 +0100 Subject: [PATCH] [kservice][ti c28x]rt_vsnprintf (#6349) --- src/kservice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kservice.c b/src/kservice.c index 5665c37b57..add8c00932 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -22,6 +22,7 @@ * 2022-01-07 Gabriel add __on_rt_assert_hook * 2022-06-04 Meco Man remove strnlen * 2022-08-24 Yunjie make rt_memset word-independent to adapt to ti c28x (16bit word) + * 2022-08-30 Yunjie make rt_vsnprintf adapt to ti c28x (16bit int) */ #include @@ -1111,7 +1112,7 @@ RT_WEAK int rt_vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list arg } else if (qualifier == 'h') { - num = (rt_uint16_t)va_arg(args, rt_int32_t); + num = (rt_uint16_t)va_arg(args, int); if (flags & SIGN) num = (rt_int16_t)num; } else