Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed an issue where the 1st line showing 17 bytes of data instead of…
… 16 bytes like the rest of the lines
  • Loading branch information
anr2me committed Sep 6, 2020
1 parent ec6fdc2 commit 442d368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/native/base/stringutil.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 442d368

Please sign in to comment.