From 7518e76fb706fe036fb4579f21401df6e091f9b0 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 14 Jun 2024 11:43:31 -0400 Subject: Fix double traversal of HLIL switch case contents when not in AST form --- highlevelilinstruction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'highlevelilinstruction.cpp') diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp index 3626dd54..c27e1251 100644 --- a/highlevelilinstruction.cpp +++ b/highlevelilinstruction.cpp @@ -1103,7 +1103,8 @@ void HighLevelILInstruction::CollectSubExprs(stack& toProcess) const toProcess.push(GetConditionExpr().exprIndex); break; case HLIL_CASE: - toProcess.push(GetTrueExpr().exprIndex); + if (ast) + toProcess.push(GetTrueExpr().exprIndex); exprs = GetValueExprs(); for (auto i = exprs.rbegin(); i != exprs.rend(); ++i) toProcess.push(i->exprIndex); -- cgit v1.3.1