From 006b3e4bbc6d67f06abc90c1a888e6f44ed770a5 Mon Sep 17 00:00:00 2001 From: FeO3 Date: Thu, 27 Apr 2023 20:40:06 +0800 Subject: [PATCH] Fix unicode string display bug --- pyc_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyc_string.cpp b/pyc_string.cpp index 3c8befd61..8c4bcbdb5 100644 --- a/pyc_string.cpp +++ b/pyc_string.cpp @@ -94,7 +94,7 @@ void OutputString(PycRef str, char prefix, bool triple, FILE* F, cons fputc(useQuotes ? '"' : '\'', F); } while (len--) { - if (*ch < 0x20 || *ch == 0x7F) { + if ((unsigned char)(*ch) < 0x20 || *ch == 0x7F) { if (*ch == '\r') { fputs("\\r", F); } else if (*ch == '\n') {