diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index a7c86a40d..4c8e53fb4 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -9479,6 +9479,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 == '{') { @@ -9497,6 +9501,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 == '{') {