1
0
mirror of synced 2024-11-12 10:10:53 +01:00

pattern: Don't reset offset back after variable placements in global scope

This commit is contained in:
WerWolv 2022-02-09 08:55:51 +01:00
parent 2510f61a4e
commit 0e40b8a81a

View File

@ -859,7 +859,7 @@ namespace hex::pl {
applyVariableAttributes(evaluator, this, pattern);
if (this->m_placementOffset != nullptr) {
if (this->m_placementOffset != nullptr && !evaluator->isGlobalScope()) {
evaluator->dataOffset() = startOffset;
}
@ -943,7 +943,7 @@ namespace hex::pl {
applyVariableAttributes(evaluator, this, pattern);
if (this->m_placementOffset != nullptr) {
if (this->m_placementOffset != nullptr && !evaluator->isGlobalScope()) {
evaluator->dataOffset() = startOffset;
}
@ -1259,7 +1259,7 @@ namespace hex::pl {
pattern->setEndian(sizePattern->getEndian());
}
if (this->m_placementOffset != nullptr) {
if (this->m_placementOffset != nullptr && !evaluator->isGlobalScope()) {
evaluator->dataOffset() = startOffset;
} else {
evaluator->dataOffset() = pointerEndOffset;