1
0
mirror of synced 2024-11-25 00:00:27 +01:00

patterns: Fix indexing of static arrays

This commit is contained in:
WerWolv 2021-12-10 18:53:19 +01:00
parent fb99674217
commit 2e90abd2c5

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