Skip to content

Commit 3093057

Browse files
committed
Internal - Fix 0xCF in _webui_print_ascii
1 parent cef696e commit 3093057

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/webui.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8851,14 +8851,10 @@ static void _webui_print_ascii(const char* data, size_t len) {
88518851
// may have ASCII and `0x00` inside text, as well as other non-ascii bytes
88528852
for (size_t i = 0; i < len; i++) {
88538853
register unsigned char c = (unsigned char)* data;
8854-
if (c == 0x00) {
8855-
_webui_log_debug("%c", 0xCF); // Print `¤` | TODO: Maybe we can simply print a blank space?
8854+
if (c < 32 || c > 126) {
8855+
_webui_log_debug("[0x%02X]", c);
88568856
} else {
8857-
if (c < 32 || c > 126) {
8858-
_webui_log_debug("[0x%02X]", c);
8859-
} else {
8860-
_webui_log_debug("%c", c);
8861-
}
8857+
_webui_log_debug("%c", c);
88628858
}
88638859
data++;
88648860
}

0 commit comments

Comments
 (0)