Actually decode strings in inline_string_decode

This commit is contained in:
Thomas Goyne 2013-02-08 20:27:38 -08:00
parent c9ffffda54
commit 1a8c88faea

View file

@ -58,7 +58,7 @@ std::string inline_string_decode(const std::string &input) {
std::string output;
output.reserve(input.size());
for (size_t i = 0; i < input.size(); ++i) {
if (input[i] != '#' || i + 2 < input.size())
if (input[i] != '#' || i + 2 > input.size())
output += input[i];
else {
output += (char)strtol(input.substr(i + 1, 2).c_str(), nullptr, 16);