Skip to content

Commit

Permalink
disassembler: Unset operands opcode result if first char is unset
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Sep 18, 2024
1 parent f4ed783 commit 2e5d5dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adbg/disassembler.d
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ int adbg_dis_step(adbg_disassembler_t *dasm, adbg_opcode_t *opcode) {
//TODO: disasm modes
opcode.size = dasm.cs_inst.size;
opcode.mnemonic = cs_insn_name(dasm.cs_handle, dasm.cs_inst.id);
opcode.operands = dasm.cs_inst.op_str.ptr;
opcode.operands = dasm.cs_inst.op_str[0] ? dasm.cs_inst.op_str.ptr : null;
memcpy(opcode.machine.ptr, dasm.buffer - opcode.size, opcode.size);
return 0;
}
Expand Down

0 comments on commit 2e5d5dc

Please sign in to comment.