1
0
mirror of synced 2024-11-28 17:40:51 +01:00

patterns: Fixed std::str::substr

This commit is contained in:
WerWolv 2021-09-25 00:04:40 +02:00
parent 17d5a5309a
commit 42d9753bdb

View File

@ -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);