mirror of
https://github.com/NevermindZZT/letter-shell.git
synced 2025-01-01 09:58:41 +08:00
修复 hexdump 打印长度异常
This commit is contained in:
parent
265656bdf6
commit
1072ef29e6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user