From f5ced88b5ae851a5a64ede9d83640a1108485a4c Mon Sep 17 00:00:00 2001 From: pgen Date: Sat, 19 Jun 2021 15:01:43 +0200 Subject: 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. --- smenu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'smenu.c') diff --git a/smenu.c b/smenu.c index b52f56a..d014cf4 100644 --- a/smenu.c +++ b/smenu.c @@ -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); -- cgit v1.2.3