diff options
author | pgen <p.gen.progs@gmail.com> | 2021-06-19 15:01:43 +0200 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2021-06-19 15:01:43 +0200 |
commit | f5ced88b5ae851a5a64ede9d83640a1108485a4c (patch) | |
tree | 4e901f4903b2e023fa86e4a7e542d073b2296506 /smenu.c | |
parent | 0cdc9a51f61bfc88c636c816915280280f8be2c0 (diff) |
Correctly handles the order of the -i/-e options
Correct the code to comply with the manual regarding the order of
appearance of -i and -e on the command line.
Diffstat (limited to 'smenu.c')
-rw-r--r-- | smenu.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5338,15 +5338,15 @@ exclude_re_action(char * ctx_name, char * opt_name, char * param, int nb_values, char ** values, int nb_opt_data, void ** opt_data, int nb_ctx_data, void ** ctx_data) { - int * pattern_def_exclude = opt_data[0]; + int * pattern_def_include = opt_data[0]; char ** exclude_pattern = opt_data[1]; langinfo_t * langinfo = opt_data[2]; misc_t * misc = opt_data[3]; /* Set the default behaviour if not already set. */ /* """"""""""""""""""""""""""""""""""""""""""""" */ - if (*pattern_def_exclude == -1) - *pattern_def_exclude = 0; + if (*pattern_def_include == -1) + *pattern_def_include = 1; if (*exclude_pattern == NULL) *exclude_pattern = concat("(", values[0], ")", (char *)0); |