Fix afvR and afvW by using RAnalOp.direction

This commit is contained in:
sivaramaaa 2018-06-07 18:55:20 +05:30 committed by radare
parent cb06ba6ea3
commit ecdc536106

View File

@ -580,8 +580,7 @@ static void extract_arg(RAnal *anal, RAnalFunction *fcn, RAnalOp *op, const char
} else {
ptr = (st64) r_num_get (NULL, addr);
}
//XXX: This won't work for stack based var/arg
int rw = (op->stackop == R_ANAL_STACK_SET) ? 1 : 0;
int rw = (op->direction == R_ANAL_OP_DIR_WRITE) ? 1 : 0;
if (*sign == '+') {
const char *pfx = ((ptr < fcn->maxstack) && (type == 's')) ? VARPREFIX : ARGPREFIX;
bool isarg = strcmp(pfx , ARGPREFIX) ? false : true;