Browse Source

spice2g6 poly(19 compat:

When counting token, count an expression {...} for the
gain as a single token, even if it contains spaces.
pre-master-46
Holger Vogt 5 years ago
parent
commit
fe24a4135c
  1. 18
      src/frontend/inpcom.c

18
src/frontend/inpcom.c

@ -9157,7 +9157,14 @@ static void inp_poly_2g6_compat(struct card* deck) {
case 'e':
curr_line = nexttok(curr_line);
curr_line = nexttok(curr_line);
curr_line = nexttok(curr_line);
/* The next token may be a simple text token or an expression
enclosed in brackets */
if (*curr_line == '{') {
char* tmptok = gettok_char(&curr_line, '}', TRUE, TRUE);
tfree(tmptok);
}
else
curr_line = nexttok(curr_line);
if (!curr_line) {
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
controlled_exit(1);
@ -9168,7 +9175,14 @@ static void inp_poly_2g6_compat(struct card* deck) {
case 'f':
case 'h':
curr_line = nexttok(curr_line);
curr_line = nexttok(curr_line);
/* The next token may be a simple text token or an expression
enclosed in brackets */
if (*curr_line == '{') {
char* tmptok = gettok_char(&curr_line, '}', TRUE, TRUE);
tfree(tmptok);
}
else
curr_line = nexttok(curr_line);
if (!curr_line) {
fprintf(stderr, "Error: not enough parameters in line\n %s\n", thisline);
controlled_exit(1);

Loading…
Cancel
Save