Fixed CreateHexDump's format string.
This commit is contained in:
parent
e1f75ab6d0
commit
3590f97e00
@ -548,9 +548,9 @@ AString & CreateHexDump(AString & a_Out, const void * a_Data, size_t a_Size, siz
|
|||||||
}
|
}
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// MSVC provides a "secure" version of sprintf()
|
// MSVC provides a "secure" version of sprintf()
|
||||||
int Count = sprintf_s(line, sizeof(line), "%08x:", i);
|
int Count = sprintf_s(line, sizeof(line), "%08x:", (unsigned)i);
|
||||||
#else
|
#else
|
||||||
int Count = sprintf(line, "%08x:", i);
|
int Count = sprintf(line, "%08x:", (unsigned)i);
|
||||||
#endif
|
#endif
|
||||||
// Remove the terminating NULL / leftover garbage in line, after the sprintf-ed value
|
// Remove the terminating NULL / leftover garbage in line, after the sprintf-ed value
|
||||||
memset(line + Count, 32, sizeof(line) - Count);
|
memset(line + Count, 32, sizeof(line) - Count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user