1
0
mirror of synced 2024-11-14 02:57:41 +01:00

patterns: Fixed variable access inside pointer pattern yielding invalid results

This commit is contained in:
WerWolv 2021-12-05 21:54:09 +01:00
parent 69973af1ed
commit c2d1589e74

View File

@ -1090,13 +1090,13 @@ namespace hex::pl {
offset = evaluator->dataOffset();
{
auto pointedAtPattern = this->m_type->createPatterns(evaluator).front();
u128 pointerAddress = 0;
evaluator->getProvider()->read(pattern->getOffset(), &pointerAddress, pattern->getSize());
pointerAddress = hex::changeEndianess(pointerAddress, sizePattern->getSize(), sizePattern->getEndian());
pointedAtPattern->setOffset(pointerAddress);
evaluator->dataOffset() = pointerAddress;
auto pointedAtPattern = this->m_type->createPatterns(evaluator).front();
pattern->setPointedAtPattern(pointedAtPattern);
pattern->setEndian(sizePattern->getEndian());