mirror of
https://github.com/armink/EasyLogger.git
synced 2025-01-31 13:32:52 +08:00
解决elog_hexdump中数据偏移地址错误的问题
This commit is contained in:
parent
fbdc6c23b0
commit
1362ff7f4e
@ -699,7 +699,7 @@ void elog_hexdump(const char *name, uint8_t width, uint8_t *buf, uint16_t size)
|
|||||||
|
|
||||||
for (i = 0; i < size; i += width) {
|
for (i = 0; i < size; i += width) {
|
||||||
/* package header */
|
/* package header */
|
||||||
fmt_result = snprintf(log_buf, ELOG_LINE_BUF_SIZE, "D/HEX %s: %04X-%04X: ", name, i, i + width);
|
fmt_result = snprintf(log_buf, ELOG_LINE_BUF_SIZE, "D/HEX %s: %04X-%04X: ", name, i, i + width - 1);
|
||||||
/* calculate log length */
|
/* calculate log length */
|
||||||
if ((fmt_result > -1) && (fmt_result <= ELOG_LINE_BUF_SIZE)) {
|
if ((fmt_result > -1) && (fmt_result <= ELOG_LINE_BUF_SIZE)) {
|
||||||
log_len = fmt_result;
|
log_len = fmt_result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user