1
0
mirror of synced 2024-11-24 15:50:16 +01:00

pattern: Make current data offset in attributes point to start address of pattern

This commit is contained in:
WerWolv 2021-10-05 21:55:30 +02:00
parent 044e65eb20
commit e3a6ac548b

View File

@ -561,6 +561,10 @@ namespace hex::pl {
};
inline void applyVariableAttributes(Evaluator *evaluator, const Attributable *attributable, PatternData *pattern) {
auto endOffset = evaluator->dataOffset();
evaluator->dataOffset() = pattern->getOffset();
ON_SCOPE_EXIT { evaluator->dataOffset() = endOffset; };
for (ASTNodeAttribute *attribute : attributable->getAttributes()) {
auto &name = attribute->getAttribute();
auto value = attribute->getValue();