解决elog_hexdump中数据偏移地址的问题, fixed #50
pull/55/head
朱天龙 (Armink) 6 years ago committed by GitHub
commit f61a9ad6d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {
/* 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 */
if ((fmt_result > -1) && (fmt_result <= ELOG_LINE_BUF_SIZE)) {
log_len = fmt_result;

Loading…
Cancel
Save