Fix --dump output

This commit is contained in:
Daniel Marjamäki 2018-03-31 10:27:34 +02:00
parent da4fc25fee
commit ecfb4fd26c
1 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ std::string ErrorLogger::toxml(const std::string &str)
{ {
std::ostringstream xml; std::ostringstream xml;
for (std::size_t i = 0U; i < str.length(); i++) { for (std::size_t i = 0U; i < str.length(); i++) {
char c = str[i]; unsigned char c = str[i];
switch (c) { switch (c) {
case '<': case '<':
xml << "&lt;"; xml << "&lt;";
@ -565,7 +565,7 @@ std::string ErrorLogger::toxml(const std::string &str)
xml << "\\0"; xml << "\\0";
break; break;
default: default:
if (c >= ' ' && c <= 'z') if (c >= ' ' && c <= 0x7f)
xml << c; xml << c;
else else
xml << 'x'; xml << 'x';