From 9d314b4b30d97cc09c90021bb52bf44058391b04 Mon Sep 17 00:00:00 2001 From: Hat Kid <6624576+Hat-Kid@users.noreply.github.com> Date: Sat, 7 Dec 2024 20:01:00 +0100 Subject: [PATCH] fix assert on symbols --- decompiler/IR2/FormExpressionAnalysis.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index 9b88722e2d..f0e93089ed 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -2674,9 +2674,10 @@ void SetVarElement::push_to_stack(const Env& env, FormPool& pool, FormStack& sta divisor = pool.form(divisor_num); } if (divisor) { - if (b_as_deref || (env.get_types_before_op(b_as_simple->expr().var().idx()) - .get(b_as_simple->expr().var().reg()) - .typespec() == TypeSpec("float"))) { + if (b_as_deref || (b_as_simple->expr().is_var() && + env.get_types_before_op(b_as_simple->expr().var().idx()) + .get(b_as_simple->expr().var().reg()) + .typespec() == TypeSpec("float"))) { *m_src->back_ref() = pool.alloc_element( GenericOperator::make_fixed(FixedOperatorKind::DIVISION), mr.maps.forms.at(1), divisor);