Fix regression in /rc and avoid repeated errors ##search (#12005)

This commit is contained in:
radare 2018-10-30 15:23:28 +01:00 committed by GitHub
parent 34abfd6d64
commit 1880a96d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -3003,10 +3003,9 @@ R_API int r_core_anal_search(RCore *core, ut64 from, ut64 to, ut64 ref, int mode
}
switch (mode) {
case 'c':
if (!opiscall (core, &op, at + i, buf + i, core->blocksize - i, arch)) {
i += op.size;
r_anal_op_fini (&op);
continue;
(void)opiscall (core, &op, at + i, buf + i, core->blocksize - i, arch);
if (op.size <1) {
op.size = 1;
}
break;
case 'r':

View File

@ -2795,7 +2795,12 @@ reread:
goto beach;
case 'r': // "/r" and "/re"
{
ut64 n = input[2]==' '? r_num_math (core->num, input + 2): UT64_MAX;
ut64 n = (input[1] == ' ' || (input[1] && input[2]==' '))
? r_num_math (core->num, input + 2): UT64_MAX;
if (n == 0LL) {
eprintf ("Cannot find null references.\n");
break;
}
switch (input[1]) {
case 'c': // "/rc"
{