提交 35c7dd6a 编写于 作者: armink_ztl's avatar armink_ztl 提交者: mysterywolf

[ulog] fix HEX log size calculate error.

上级 ed1bcfbd
......@@ -823,7 +823,7 @@ void ulog_hexdump(const char *tag, rt_size_t width, const rt_uint8_t *buf, rt_si
for (i = 0; i < size; i += width, buf += width)
{
if (i + size < width)
if (i + width > size)
len = size - i;
else
len = width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册