fixed escape_string for binary data

This commit is contained in:
MihailRis 2024-01-25 00:33:13 +03:00
parent 5687e55094
commit 9332fa375c

View File

@ -68,7 +68,7 @@ std::string escape_string(std::string s) {
case '\\': ss << "\\\\"; break;
default:
if (c < ' ') {
ss << "\\" << std::oct << (int)c;
ss << "\\" << std::oct << uint(ubyte(c));
break;
}
ss << c;