Skip to content

Commit

Permalink
Use strstr instead of rstr.glob for now in @@ ##shell
Browse files Browse the repository at this point in the history
* That doesnt changes the behaviour, but RStr.glob() is broken and fixing it will break this
  • Loading branch information
trufae committed Apr 1, 2022
1 parent 605785b commit 58b3676
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libr/core/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ struct duplicate_flag_t {
static bool duplicate_flag(RFlagItem *flag, void *u) {
struct duplicate_flag_t *user = (struct duplicate_flag_t *)u;
/* filter per flag spaces */
if (r_str_glob (flag->name, user->word)) {
bool valid = strchr (user->word, '*')
? r_str_glob (flag->name, user->word)
: strstr (flag->name, user->word) != NULL;
if (valid) {
RFlagItem *cloned_item = r_flag_item_clone (flag);
if (!cloned_item) {
return false;
Expand Down

0 comments on commit 58b3676

Please sign in to comment.