diff options
| author | armink <[email protected]> | 2019-08-03 16:52:37 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-08-03 16:52:37 +0800 |
| commit | 8feb6af99256c306ee71f28ef9844c320fd8687b (patch) | |
| tree | 51e269f4af780f3ae96db9c2cc2f76980c1196a7 /components/utilities | |
| parent | 0ed24743c7c66c21db3be35c2394af4018f4e325 (diff) | |
[component/ulog] Fix ulog hexdump show issue.
Diffstat (limited to 'components/utilities')
| -rw-r--r-- | components/utilities/ulog/ulog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/utilities/ulog/ulog.c b/components/utilities/ulog/ulog.c index 9af5fe5b9d..8a8d142eff 100644 --- a/components/utilities/ulog/ulog.c +++ b/components/utilities/ulog/ulog.c @@ -684,7 +684,7 @@ void ulog_hexdump(const char *tag, rt_size_t width, rt_uint8_t *buf, rt_size_t s log_len = 6 + name_len + 2; rt_memset(log_buf, ' ', log_len); } - fmt_result = rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE, "%04X-%04X: ", i, i + width); + fmt_result = rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE, "%04X-%04X: ", i, i + width - 1); /* calculate log length */ if ((fmt_result > -1) && (fmt_result <= ULOG_LINE_BUF_SIZE)) { |
