From 0aa1aff6ba5b9c83dacdb97bcf31086aee2e59bd Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 27 Jul 2021 11:10:04 +0200 Subject: [PATCH] StrFmt: fix comma placement in format_byte_array --- Utilities/StrFmt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/StrFmt.cpp b/Utilities/StrFmt.cpp index 0b1fae4f0e..689b71de7b 100644 --- a/Utilities/StrFmt.cpp +++ b/Utilities/StrFmt.cpp @@ -191,14 +191,14 @@ void format_byte_array(std::string& out, const uchar* data, usz size) break; } - if (i % 4) + if ((i % 4) == 3) { // Place a comma each 4 bytes for ease of byte placement finding - fmt::append(out, "%02X ", data[i]); + fmt::append(out, "%02X, ", data[i]); continue; } - fmt::append(out, "%02X, ", data[i]); + fmt::append(out, "%02X ", data[i]); } out += " }";