Skip to content

Commit 94a08d8

Browse files
committed
Correct the string memdump thing
1 parent 73ab6cd commit 94a08d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/dynlibutils/memaddr.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ inline std::string MemToHexString(T val)
7070

7171
inline char MemToHumanChar(std::uint8_t byte)
7272
{
73-
return ('~' <= byte && byte <= ' ') ? static_cast<char>(byte) : '.';
73+
return (' ' <= byte && byte <= '~') ? static_cast<char>(byte) : '.';
7474
}
7575

7676
template<std::size_t BYTES_PER_LINE>
@@ -210,7 +210,7 @@ class CMemory
210210
for (std::size_t i = 0; i < pad; ++i)
211211
sLine += " ";
212212

213-
sLine += " |" + sFormated + "|\n";
213+
sLine += (pad ? "|" : " |") + sFormated + "|\n";
214214
funcOutput(sLine);
215215
nOutputCount++;
216216
}

0 commit comments

Comments
 (0)