diff --git a/src/SleighAnalValue.cpp b/src/SleighAnalValue.cpp index f0aa62bc..ce3af9c0 100644 --- a/src/SleighAnalValue.cpp +++ b/src/SleighAnalValue.cpp @@ -1,4 +1,4 @@ -/* r2ghidra - LGPL - Copyright 2020-2023 - FXTi, pancake */ +/* r2ghidra - LGPL - Copyright 2020-2024 - FXTi, pancake */ #include "SleighAnalValue.h" @@ -70,7 +70,11 @@ SleighAnalValue SleighAnalValue::resolve_arg(RAnal *anal, const PcodeOperand *ar res.imm = (curr_op->type == CPUI_INT_ADD)? in0.imm + in1.imm : in0.imm - in1.imm; } else { res.base = in0.imm + in0.base; - res.base += (curr_op->type == CPUI_INT_ADD)? (in1.imm + in1.base) : -(in1.imm + in1.base); + if (curr_op->type == CPUI_INT_ADD) { + res.base += (in1.imm + in1.base); + } else { + res.base -= (in1.imm + in1.base); + } } res.mul = inner_max(in0.mul, in1.mul); // Only one of inputs should set mul res.delta = inner_max(in0.delta, in1.delta); diff --git a/src/r2ghidra.h b/src/r2ghidra.h index 21448b99..450c21aa 100644 --- a/src/r2ghidra.h +++ b/src/r2ghidra.h @@ -1,6 +1,7 @@ #ifndef R2GHIDRA_H #define R2GHIDRA_H +#undef R_LOG_ORIGIN #define R_LOG_ORIGIN "r2ghidra" #include