Fix afa- and o--;r-

This commit is contained in:
pancake 2015-04-16 17:57:36 +02:00
parent 2096e855ba
commit 6ff92a2b1d
2 changed files with 8 additions and 3 deletions

View File

@ -78,8 +78,13 @@ static int var_cmd(RCore *core, const char *str) {
r_anal_var_list_show (core->anal, fcn, core->offset);
goto end;
case '-':
r_anal_var_delete (core->anal, fcn->addr, type, 1, (int)
r_num_math (core->num, str+1));
if (fcn) {
r_anal_var_delete (core->anal, fcn->addr,
type, 1, (int)
r_num_math (core->num, str+1));
} else {
eprintf ("Cnnot find function here\n");
}
goto end;
case 'n':
str++;

View File

@ -540,7 +540,7 @@ R_API ut64 r_io_read_i(RIO *io, ut64 addr, int sz, int endian) {
// TODO. this is a physical resize
R_API int r_io_resize(RIO *io, ut64 newsize) {
if (io->plugin) {
if (io->plugin->resize) {
if (io->plugin->resize && io->desc) {
int res = io->plugin->resize (io, io->desc, newsize);
if (res)
r_io_map_truncate_update (io, io->desc->fd, newsize);