patterns: Fixed std::str::substr
This commit is contained in:
parent
17d5a5309a
commit
42d9753bdb
@ -206,7 +206,7 @@ namespace hex::plugin::builtin {
|
||||
auto pos = Token::literalToUnsigned(params[1]);
|
||||
auto size = Token::literalToUnsigned(params[2]);
|
||||
|
||||
if (pos > size)
|
||||
if (pos > string.length())
|
||||
LogConsole::abortEvaluation("character index out of range");
|
||||
|
||||
return string.substr(pos, size);
|
||||
|
Loading…
Reference in New Issue
Block a user