Skip to content

Commit

Permalink
Use RzSearchParam callback in rz_search_find if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
DMaroo committed Mar 8, 2022
1 parent 62409b8 commit 8681936
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion librz/search/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,11 @@ static int listcb(RzSearchKeyword *k, void *user, ut64 addr) {

RZ_API RzList *rz_search_find(RzSearch *s, ut64 addr, const ut8 *buf, int len) {
RzList *ret = rz_list_new();
rz_search_set_callback(s, listcb, ret);
if (!s->callback) {
rz_search_set_callback(s, listcb, ret);
} else {
rz_search_set_callback(s, s->callback, ret);
}
rz_search_update(s, addr, buf, len);
return ret;
}
Expand Down

0 comments on commit 8681936

Please sign in to comment.