mirror of https://github.com/WerWolv/ImHex.git
patterns: Fix indexing of static arrays
This commit is contained in:
parent
fb99674217
commit
2e90abd2c5
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue