mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Update utility.cpp
- address review comment
This commit is contained in:
parent
1f488862c6
commit
fae9d6681d
@ -33,7 +33,7 @@ UString visibleAsciiOrHex(UINT8* bytes, UINT32 length)
|
|||||||
for (UINT32 i = 0; i < length; i++) {
|
for (UINT32 i = 0; i < length; i++) {
|
||||||
hexString += usprintf("%02X", bytes[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++) {
|
for (UINT32 j = i + 1; j < length; j++) {
|
||||||
if (bytes[j] != '\x00') {
|
if (bytes[j] != '\x00') {
|
||||||
ascii = false;
|
ascii = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user