Make -x behave like /x unless mask is provided ##search

This commit is contained in:
Vasilij Schneidermann 2019-03-05 20:28:31 +01:00 committed by radare
parent 68001dc8f8
commit e39c9424aa

View File

@ -197,7 +197,11 @@ static int rafind_open_file(char *file) {
if (mode == R_SEARCH_KEYWORD) {
r_list_foreach (keywords, iter, kw) {
if (hexstr) {
r_search_kw_add (rs, r_search_keyword_new_hex (kw, mask, NULL));
if (mask) {
r_search_kw_add (rs, r_search_keyword_new_hex (kw, mask, NULL));
} else {
r_search_kw_add (rs, r_search_keyword_new_hexmask (kw, NULL));
}
} else if (widestr) {
r_search_kw_add (rs, r_search_keyword_new_wide (kw, mask, NULL, 0));
} else {