1
0
mirror of synced 2024-11-28 17:40:51 +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); LogConsole::abortEvaluation("array index out of bounds", this);
auto newPattern = searchScope.front()->clone(); auto newPattern = searchScope.front()->clone();
newPattern->setOffset(staticArrayPattern->getOffset() + index * staticArrayPattern->getTemplate()->getSize());
delete currPattern; delete currPattern;
currPattern = newPattern; currPattern = newPattern;
currPattern->setOffset(staticArrayPattern->getOffset() + index * staticArrayPattern->getSize());
} }
} }
}, index->getValue()); }, index->getValue());