fixed rt_kprintf %s precision print error.
This commit is contained in:
parent
186466ecc6
commit
ac2c734583
|
@ -922,7 +922,7 @@ rt_int32_t rt_vsnprintf(char *buf,
|
||||||
s = va_arg(args, char *);
|
s = va_arg(args, char *);
|
||||||
if (!s) s = "(NULL)";
|
if (!s) s = "(NULL)";
|
||||||
|
|
||||||
len = rt_strlen(s);
|
for (len = 0; (len != field_width) && (s[len] != '\0'); len++);
|
||||||
#ifdef RT_PRINTF_PRECISION
|
#ifdef RT_PRINTF_PRECISION
|
||||||
if (precision > 0 && len > precision) len = precision;
|
if (precision > 0 && len > precision) len = precision;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue