From c3e41710c7343decb0db25eca53753e192d7f19f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 16 Apr 2021 10:11:10 +0200 Subject: [PATCH] patterns: Properly apply base addresses to pointers --- plugins/libimhex/source/lang/evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libimhex/source/lang/evaluator.cpp b/plugins/libimhex/source/lang/evaluator.cpp index 6dca40af9..483b37ba5 100644 --- a/plugins/libimhex/source/lang/evaluator.cpp +++ b/plugins/libimhex/source/lang/evaluator.cpp @@ -843,7 +843,7 @@ namespace hex::lang { size_t pointerSize = sizeType->getSize(); u128 pointedAtOffset = 0; - this->m_provider->read(pointerOffset, &pointedAtOffset, pointerSize); + this->m_provider->read(pointerOffset - this->m_provider->getBaseAddress(), &pointedAtOffset, pointerSize); this->m_currOffset = hex::changeEndianess(pointedAtOffset, pointerSize, underlyingType->getEndian().value_or(this->m_defaultDataEndian)); delete sizeType;