Improved backward so and fix bad char into source file

This commit is contained in:
SkUaTeR 2017-02-09 00:31:40 +01:00 committed by radare
parent 069f5f40ba
commit 778c5c8298
2 changed files with 6 additions and 2 deletions

View File

@ -376,7 +376,11 @@ static int cmd_seek(void *data, const char *input) {
int instr_len;
ut64 addr = core->offset;
int numinstr = n * -1;
ret = r_core_asm_bwdis_len (core, &instr_len, &addr, numinstr);
if (r_core_prevop_addr (core, core->offset, numinstr, &addr)) {
ret = core->offset - addr;
} else {
ret = r_core_asm_bwdis_len (core, &instr_len, &addr, numinstr);
}
r_core_seek (core, addr, true);
val += ret;
} else {

View File

@ -128,7 +128,7 @@ R_API bool r_id_storage_set(RIDStorage *storage, void *data, ut32 id) {
}
R_API bool r_id_storage_add(RIDStorage *storage, void *data, ut32 *id) {
if (!storage || !r_id_pool_grab_id (storage->pool, id)) {
if (!storage || !r_id_pool_grab_id (storage->pool, id)) {
return false;
}
return r_id_storage_set (storage, data, *id);