mirror of
https://github.com/radareorg/radare2.git
synced 2025-04-02 09:31:45 +00:00
Initialize and finalize op in r_asm_mdisassemble()
This commit is contained in:
parent
189fe015b2
commit
edab13d455
@ -692,7 +692,7 @@ R_API RAsmCode* r_asm_mdisassemble(RAsm *a, const ut8 *buf, int len) {
|
||||
RStrBuf *buf_asm;
|
||||
RAsmCode *acode;
|
||||
ut64 pc = a->pc;
|
||||
RAsmOp op;
|
||||
RAsmOp op = {0};
|
||||
ut64 idx;
|
||||
size_t ret;
|
||||
const size_t addrbytes = a->user? ((RCore *)a->user)->io->addrbytes: 1;
|
||||
@ -719,6 +719,7 @@ R_API RAsmCode* r_asm_mdisassemble(RAsm *a, const ut8 *buf, int len) {
|
||||
r_strbuf_append (buf_asm, r_strbuf_get (&op.buf_asm));
|
||||
r_strbuf_append (buf_asm, "\n");
|
||||
}
|
||||
r_asm_op_fini (&op);
|
||||
acode->assembly = r_strbuf_drain (buf_asm);
|
||||
acode->len = idx;
|
||||
return acode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user