From 1072ef29e67e34faab810941e2644d5d39039df0 Mon Sep 17 00:00:00 2001 From: Letter Date: Sun, 12 Jun 2022 19:45:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20hexdump=20=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=95=BF=E5=BA=A6=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/log/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/log/log.c b/extensions/log/log.c index 021ae04..092e7f6 100644 --- a/extensions/log/log.c +++ b/extensions/log/log.c @@ -156,13 +156,13 @@ void logHexDump(Log *log, LogLevel level, void *base, unsigned int length) len = snprintf(logBuffer, LOG_BUFFER_SIZE - 1, "memory of 0x%08x, size: %d:\r\n%s", (unsigned int)base, length, memPrintHead); logWriteBuffer(log, level, logBuffer, len); + + len = length; address = (unsigned char *)((unsigned int)base & (~0x0000000F)); length += (unsigned int)base - (unsigned int)address; length = (length + 15) & (~0x0000000F); - len = length; - while (length) { printLen += sprintf(logBuffer + printLen, memPrintAddr, (unsigned int)address);