From 17d5a5309a319eb0626f95a3433fa08567ca6593 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 25 Sep 2021 00:03:32 +0200 Subject: [PATCH] patterns: Fixed setting variables in functions --- plugins/libimhex/source/pattern_language/evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libimhex/source/pattern_language/evaluator.cpp b/plugins/libimhex/source/pattern_language/evaluator.cpp index 307d6317c..f721326d4 100644 --- a/plugins/libimhex/source/pattern_language/evaluator.cpp +++ b/plugins/libimhex/source/pattern_language/evaluator.cpp @@ -95,7 +95,7 @@ namespace hex::pl { } }, value); - this->getStack().back() = castedLiteral; + this->getStack()[pattern->getOffset()] = castedLiteral; } std::optional> Evaluator::evaluate(const std::vector &ast) {