From 442d3685dc802edccd43029434eb3de26c3ebbb2 Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Mon, 7 Sep 2020 02:56:59 +0700 Subject: [PATCH] Fixed an issue where the 1st line showing 17 bytes of data instead of 16 bytes like the rest of the lines --- ext/native/base/stringutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/native/base/stringutil.cpp b/ext/native/base/stringutil.cpp index adcd94b20a..c26bc0c5bd 100644 --- a/ext/native/base/stringutil.cpp +++ b/ext/native/base/stringutil.cpp @@ -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); }