From 27a019d9f83b71b061ae93edaf933cc1ee429b36 Mon Sep 17 00:00:00 2001 From: James <49045138+ghidracadabra@users.noreply.github.com> Date: Wed, 14 May 2025 20:24:04 +0000 Subject: [PATCH] GP-5676 fixed issue involving ops with one input in BooleanMatch::evalute --- Ghidra/Features/Decompiler/src/decompile/cpp/op.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc index e165951fe6..a62ee56fc3 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/op.cc @@ -1476,8 +1476,17 @@ int4 BooleanMatch::evaluate(Varnode *vn1,Varnode *vn2,int4 depth) else { // Two boolean output ops, compare them directly if (opc1 == opc2) { - if (varnodeSame(op1->getIn(0),op2->getIn(0)) && varnodeSame(op1->getIn(1),op2->getIn(1))) + bool sameOp = true; + int numInputs = op1->numInput(); + for (int i = 0; i < numInputs; ++i){ + if (!varnodeSame(op1->getIn(i),op2->getIn(i))){ + sameOp = false; + break; + } + } + if (sameOp){ return same; + } if (sameOpComplement(op1,op2)) { return complementary; }