fix xcmd_print bug

修改xcmd_print代码,解决当字符串长度超过128的时候出现段错误的问题
This commit is contained in:
qmfr 2021-09-22 08:39:04 +00:00 committed by Gitee
parent 14ab2c3805
commit 496dcb9ea4
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ void xcmd_print(const char *fmt, ...)
char ucstring[128] = {0};
va_list arg;
va_start(arg, fmt);
vsnprintf(ucstring, 256, fmt, arg);
vsnprintf(ucstring, 128, fmt, arg);
va_end(arg);
for(uint16_t i=0; ucstring[i]; i++)