patterns: Allow str to be used in function bodies

This commit is contained in:
WerWolv
2021-10-04 20:26:34 +02:00
parent a93049056a
commit 4b9aff5b29
5 changed files with 53 additions and 14 deletions

View File

@@ -192,7 +192,7 @@ namespace hex::plugin::builtin {
auto string = Token::literalToString(params[0], false);
auto index = Token::literalToSigned(params[1]);
if (std::abs(index) >= string.length())
if (std::abs(index) > string.length())
LogConsole::abortEvaluation("character index out of range");
if (index >= 0)