@@ -485,7 +485,6 @@ static int is_hit_inrange(RCoreAsmHit *hit, ut64 start_range, ut64 end_range){
485
485
R_API RList * r_core_asm_bwdisassemble (RCore * core , ut64 addr , int n , int len ) {
486
486
RAsmOp op ;
487
487
// if (n > core->blocksize) n = core->blocksize;
488
- ut64 at ;
489
488
ut32 idx = 0 , hit_count ;
490
489
int numinstr , asmlen , ii ;
491
490
const int addrbytes = core -> io -> addrbytes ;
@@ -494,8 +493,7 @@ R_API RList *r_core_asm_bwdisassemble(RCore *core, ut64 addr, int n, int len) {
494
493
if (!hits ) {
495
494
return NULL ;
496
495
}
497
-
498
- len = R_MIN (len - len % addrbytes , addrbytes * addr );
496
+ len = R_MIN (len - (len % addrbytes ), addrbytes * addr );
499
497
if (len < 1 ) {
500
498
r_list_free (hits );
501
499
return NULL ;
@@ -509,7 +507,7 @@ R_API RList *r_core_asm_bwdisassemble(RCore *core, ut64 addr, int n, int len) {
509
507
free (buf );
510
508
return NULL ;
511
509
}
512
- if (!r_io_read_at (core -> io , addr - len / addrbytes , buf , len )) {
510
+ if (!r_io_read_at (core -> io , addr - ( len / addrbytes ) , buf , len )) {
513
511
r_list_free (hits );
514
512
free (buf );
515
513
return NULL ;
@@ -536,7 +534,9 @@ R_API RList *r_core_asm_bwdisassemble(RCore *core, ut64 addr, int n, int len) {
536
534
break ;
537
535
}
538
536
}
539
- at = addr - idx / addrbytes ;
537
+
538
+ ut64 at = addr - idx / addrbytes ;
539
+
540
540
r_asm_set_pc (core -> rasm , at );
541
541
for (hit_count = 0 ; hit_count < n ; hit_count ++ ) {
542
542
int instrlen = r_asm_disassemble (core -> rasm , & op ,
0 commit comments