Fix unicode string display bug

This commit is contained in:
FeO3
2023-04-27 20:40:06 +08:00
parent 2e76e56420
commit 006b3e4bbc

View File

@@ -94,7 +94,7 @@ void OutputString(PycRef<PycString> 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') {