summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
author朱天龙 (Armink) <[email protected]>2022-10-10 18:32:14 +0800
committerMan, Jianting (Meco) <[email protected]>2022-10-10 08:47:41 -0400
commit35c7dd6aba21827b32ea756b9907e8da8cec7a5f (patch)
tree3a2c7c2a4714b369d77e2cb9ed6db1e0dbd99743 /components
parented1bcfbd7ea805ec437e5cfe2f9f2cde3b812d9e (diff)
[ulog] fix HEX log size calculate error.
Diffstat (limited to 'components')
-rw-r--r--components/utilities/ulog/ulog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/utilities/ulog/ulog.c b/components/utilities/ulog/ulog.c
index 45e065dce7..430ead3f1c 100644
--- a/components/utilities/ulog/ulog.c
+++ b/components/utilities/ulog/ulog.c
@@ -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;