Skip to content

Commit

Permalink
Fix to_hex_if_need function on string utils
Browse files Browse the repository at this point in the history
This fix issue #1535. Solution was the same suggested on #1523.
  • Loading branch information
Felipe Zimmerle committed Aug 22, 2017
1 parent 8d6209f commit 3071dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/string.cc
Expand Up @@ -136,7 +136,7 @@ std::string toHexIfNeeded(const std::string &str) {
std::stringstream res;

for (int i = 0; i < str.size(); i++) {
int c = str.at(i);
int c = (unsigned char)str.at(i);
if (c < 32 || c > 126) {
res << "\\x" << std::setw(2) << std::setfill('0') << std::hex << c;
} else {
Expand Down

0 comments on commit 3071dbb

Please sign in to comment.