Don't drop the last two chaacters in inline_string_decode
This commit is contained in:
parent
e0a3f1d399
commit
9a69017752
1 changed files with 2 additions and 2 deletions
|
@ -57,8 +57,8 @@ std::string inline_string_encode(const std::string &input) {
|
|||
std::string inline_string_decode(const std::string &input) {
|
||||
std::string output;
|
||||
output.reserve(input.size());
|
||||
for (size_t i = 0; i < input.size() - 2; ++i) {
|
||||
if (input[i] != '#')
|
||||
for (size_t i = 0; i < input.size(); ++i) {
|
||||
if (input[i] != '#' || i + 2 < input.size())
|
||||
output += input[i];
|
||||
else {
|
||||
output += (char)strtol(input.substr(i + 1, 2).c_str(), nullptr, 16);
|
||||
|
|
Loading…
Reference in a new issue