Skip to content

Commit

Permalink
Fix visual assembler offset
Browse files Browse the repository at this point in the history
Relative jumps need to be assembled with the correct starting address. It was
not set correctly in the visual assembler.
  • Loading branch information
qsantos authored and radare committed May 5, 2015
1 parent 138ce88 commit eabfaaf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libr/core/vasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static int readline_callback(void *_a, const char *str) {
);
} else {
r_asm_code_free (a->acode);
r_asm_set_pc (a->core->assembler, a->core->offset);
a->acode = r_asm_massemble (a->core->assembler, str);
r_cons_printf ("%d> %s\n", a->acode? a->acode->len: 0, str);
if (a->acode && a->acode->len)
Expand Down

0 comments on commit eabfaaf

Please sign in to comment.