patterns: Fix indexing of static arrays

This commit is contained in:
WerWolv 2021-12-10 18:53:19 +01:00
parent fb99674217
commit 2e90abd2c5
1 changed files with 1 additions and 1 deletions

View File

@ -1647,9 +1647,9 @@ namespace hex::pl {
LogConsole::abortEvaluation("array index out of bounds", this);
auto newPattern = searchScope.front()->clone();
newPattern->setOffset(staticArrayPattern->getOffset() + index * staticArrayPattern->getTemplate()->getSize());
delete currPattern;
currPattern = newPattern;
currPattern->setOffset(staticArrayPattern->getOffset() + index * staticArrayPattern->getSize());
}
}
}, index->getValue());