Skip to content

Commit

Permalink
Update utility.cpp
Browse files Browse the repository at this point in the history
- address review comment
  • Loading branch information
NikolajSchlej authored and vit9696 committed Oct 14, 2021
1 parent 1f48886 commit fae9d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ UString visibleAsciiOrHex(UINT8* bytes, UINT32 length)
for (UINT32 i = 0; i < length; i++) {
hexString += usprintf("%02X", bytes[i]);

if (bytes[i] == '\x00') { // Check for the rest of the buffer being zeroes, and make the whole previous string visible, if so
if (ascii && i > 0 && bytes[i] == '\x00') { // Check for the rest of the buffer being zeroes, and make the whole previous string visible, if so
for (UINT32 j = i + 1; j < length; j++) {
if (bytes[j] != '\x00') {
ascii = false;
Expand Down

0 comments on commit fae9d66

Please sign in to comment.