Fixed an issue where the 1st line showing 17 bytes of data instead of 16 bytes like the rest of the lines

This commit is contained in:
ANR2ME
2020-09-07 02:56:59 +07:00
parent ec6fdc2ac0
commit 442d3685dc
+1 -1
View File
@@ -64,9 +64,9 @@ void StringUpper(char *str, int len) {
void DataToHexString(const uint8_t *data, size_t size, std::string *output) {
Buffer buffer;
for (size_t i = 0; i < size; i++) {
buffer.Printf("%02x ", data[i]);
if (i && !(i & 15))
buffer.Printf("\n");
buffer.Printf("%02x ", data[i]);
}
buffer.TakeAll(output);
}