From dbc530f6a19f004d5d72da63fd927ddd3a416579 Mon Sep 17 00:00:00 2001 From: Christian Heitman Date: Fri, 29 Sep 2023 16:27:30 -0300 Subject: [PATCH] Fix isSymbolic computation for IteNode --- src/libtriton/ast/ast.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libtriton/ast/ast.cpp b/src/libtriton/ast/ast.cpp index 748e33cab..37aa04ca1 100644 --- a/src/libtriton/ast/ast.cpp +++ b/src/libtriton/ast/ast.cpp @@ -2716,10 +2716,16 @@ namespace triton { /* Init children and spread information */ for (triton::uint32 index = 0; index < this->children.size(); index++) { this->children[index]->setParent(this); - this->symbolized |= this->children[index]->isSymbolized(); this->level = std::max(this->children[index]->getLevel() + 1, this->level); } + /* Spread symbolic information */ + if (!this->children[0]->isSymbolized()) { + this->symbolized = this->children[0]->evaluate() ? this->children[1]->isSymbolized() : this->children[2]->isSymbolized(); + } else { + this->symbolized = true; + } + /* Init parents if needed */ if (withParents) { this->initParents();