diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index f1b37406d..11161e781 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -9481,6 +9481,10 @@ static void inp_poly_2g6_compat(struct card* deck) { case 'e': curr_line = nexttok(curr_line); curr_line = nexttok(curr_line); + if (!curr_line) { + fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline); + controlled_exit(1); + } /* The next token may be a simple text token or an expression enclosed in brackets */ if (*curr_line == '{') { @@ -9499,6 +9503,10 @@ static void inp_poly_2g6_compat(struct card* deck) { case 'f': case 'h': curr_line = nexttok(curr_line); + if (!curr_line) { + fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline); + controlled_exit(1); + } /* The next token may be a simple text token or an expression enclosed in brackets */ if (*curr_line == '{') {