Set the recounter to 0 upon every exit from function inp_get_param_level

This commit is contained in:
Holger Vogt 2023-02-03 18:50:55 +01:00
parent f73d3b20a0
commit 4309bad14d
1 changed files with 5 additions and 1 deletions

View File

@ -4544,11 +4544,14 @@ static int inp_get_param_level(
" You probably do have a circular parameter dependency at line\n");
fprintf(stderr,
" %s\n", deps[param_num].card->line);
recounter = 0;
controlled_exit(EXIT_FAILURE);
}
if (deps[param_num].level != -1)
if (deps[param_num].level != -1) {
recounter = 0;
return deps[param_num].level;
}
for (i = 0; deps[param_num].depends_on[i]; i++) {
@ -4560,6 +4563,7 @@ static int inp_get_param_level(
fprintf(stderr,
"ERROR: unable to find dependency parameter for %s!\n",
deps[param_num].param_name);
recounter = 0;
controlled_exit(EXIT_FAILURE);
}