mirror of https://github.com/odrling/Aegisub
Actually decode strings in inline_string_decode
This commit is contained in:
parent
c9ffffda54
commit
1a8c88faea
|
@ -58,7 +58,7 @@ std::string inline_string_decode(const std::string &input) {
|
||||||
std::string output;
|
std::string output;
|
||||||
output.reserve(input.size());
|
output.reserve(input.size());
|
||||||
for (size_t i = 0; i < input.size(); ++i) {
|
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];
|
output += input[i];
|
||||||
else {
|
else {
|
||||||
output += (char)strtol(input.substr(i + 1, 2).c_str(), nullptr, 16);
|
output += (char)strtol(input.substr(i + 1, 2).c_str(), nullptr, 16);
|
||||||
|
|
Loading…
Reference in New Issue