Skip to content

Commit

Permalink
Fix unicode escape sequence formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
--nn committed Nov 18, 2017
1 parent 0ae6eb1 commit 2746cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RenX.ServerList/RenX_ServerList.cpp
Expand Up @@ -52,7 +52,7 @@ Jupiter::String jsonify(const Jupiter::ReadableString &in_str)
result += '\"';
}
else if (*ptr < 0x20) // control characters
result.aformat("\\u00%x", *ptr);
result.aformat("\\u%04x", *ptr);
else if ((*ptr & 0x80) != 0) // UTF-8 sequence; copy to bypass above processing
{
result += *ptr;
Expand Down Expand Up @@ -105,7 +105,7 @@ Jupiter::String sanitize_game(const Jupiter::ReadableString &in_str)
result += '\"';
}
else if (*ptr < 0x20) // control characters
result.aformat("\\u00%x", *ptr);
result.aformat("\\u%04x", *ptr);
else if (*ptr == '~') // Game server list control character
result += "\\u007E"_jrs;
else if (*ptr == ';') // Game server list control character
Expand Down

0 comments on commit 2746cc6

Please sign in to comment.