未验证 提交 06018318 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #4667 from geniusgogo/fix_rt_kprintf

fixed rt_kprintf %s precision print error.
......@@ -922,7 +922,7 @@ rt_int32_t rt_vsnprintf(char *buf,
s = va_arg(args, char *);
if (!s) s = "(NULL)";
len = rt_strlen(s);
for (len = 0; (len != field_width) && (s[len] != '\0'); len++);
#ifdef RT_PRINTF_PRECISION
if (precision > 0 && len > precision) len = precision;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册