From: Thomas Adam <tho...@fvwm.org> The number of conditional commands accepted as expansions in a function is 11, not 10. Fix the declaration for this, as well as using the definition for the number of arguments in a few other places where previously it was hard-coded.
--- mvwm/cmdparser.h | 2 +- mvwm/functions.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mvwm/cmdparser.h b/mvwm/cmdparser.h index da4297f..c867c31 100644 --- a/mvwm/cmdparser.h +++ b/mvwm/cmdparser.h @@ -7,7 +7,7 @@ /* ---------------------------- global definitions ------------------------- */ -#define CMDPARSER_NUM_POS_ARGS 10 +#define CMDPARSER_NUM_POS_ARGS 11 /* ---------------------------- global macros ------------------------------ */ diff --git a/mvwm/functions.c b/mvwm/functions.c index b03cd73..5f355a8 100644 --- a/mvwm/functions.c +++ b/mvwm/functions.c @@ -734,7 +734,7 @@ static void __cf_cleanup( { scr_flags.is_executing_complex_function = 0; } - for (i = 0; i < 11; i++) + for (i = 0; i < CMDPARSER_NUM_POS_ARGS; i++) { if (arguments[i] != NULL) { @@ -764,7 +764,7 @@ static void execute_complex_function( Bool ImmediateNeedsTarget = False; int do_allow_unmanaged = FUNC_ALLOW_UNMANAGED; int do_allow_unmanaged_immediate = FUNC_ALLOW_UNMANAGED; - char *arguments[11], *taction; + char *arguments[CMDPARSER_NUM_POS_ARGS], *taction; int x, y ,i; XEvent d; static int depth = 0; @@ -810,14 +810,14 @@ static void execute_complex_function( } } /* Get the argument list */ - for (i = 1; i < 11; i++) + for (i = 1; i < CMDPARSER_NUM_POS_ARGS; i++) { taction = GetNextToken(taction, &arguments[i]); } } else { - for (i = 0; i < 11; i++) + for (i = 0; i < CMDPARSER_NUM_POS_ARGS; i++) { arguments[i] = NULL; } -- 2.1.0