Skip to content

Commit 51c16ab

Browse files
committed
simplify is_zxor logic
Signed-off-by: vibhatsu <[email protected]>
1 parent fa55058 commit 51c16ab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

capa/features/extractors/ida/helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ def is_operand_equal(op1: idaapi.op_t, op2: idaapi.op_t) -> bool:
219219

220220

221221
def is_zxor(insn: idaapi.insn_t) -> bool:
222-
if is_xor(insn):
223-
return is_operand_equal(insn.Op1, insn.Op2)
224-
return False
222+
return is_xor(insn) and is_operand_equal(insn)
225223

226224

227225
def is_basic_block_equal(bb1: idaapi.BasicBlock, bb2: idaapi.BasicBlock) -> bool:

0 commit comments

Comments
 (0)