Prevent crash if there is bad syntax in h, g, e, or f line
This commit is contained in:
parent
31fbf910af
commit
a4be66b9b0
|
|
@ -9671,8 +9671,11 @@ static int inp_poly_2g6_compat(struct card* deck) {
|
|||
curr_line = nexttok_noparens(curr_line);
|
||||
curr_line = nexttok_noparens(curr_line);
|
||||
curr_line = nexttok_noparens(curr_line);
|
||||
if (!curr_line)
|
||||
if (!curr_line) {
|
||||
fprintf(stderr, "Error: bad syntax of line\n %s\n", thisline);
|
||||
fprintf(stderr, "No circuit loaded!\n");
|
||||
return 1;
|
||||
}
|
||||
/* exclude all of the following fourth tokens */
|
||||
if (ciprefix("poly", curr_line))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue