mirror of
http://git.sesse.net/plocate
synced 2025-10-05 23:42:49 +02:00
Fix an issue where non-ASCII characters would be wrongly escaped.
This only happens on platforms with signed char. Reported by COLIN Stéphane.
This commit is contained in:
@@ -91,7 +91,7 @@ void print_possibly_escaped(const string &str)
|
||||
} else if (ret == 0) {
|
||||
break; // EOF.
|
||||
}
|
||||
if (*ptr < 32 || *ptr == '\'' || *ptr == '"' || *ptr == '\\') {
|
||||
if ((unsigned char)*ptr < 32 || *ptr == '\'' || *ptr == '"' || *ptr == '\\') {
|
||||
if (!in_escaped_mode) {
|
||||
printf("'$'");
|
||||
in_escaped_mode = true;
|
||||
|
Reference in New Issue
Block a user