default: // LCOV_EXCL_LINE
BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE
}
-
+ if (!is_valid(game)) {
+ exit(1);
+ }
switch (action(command)) {
case GO_TERMINATE:
return true;
/* Bounds check for locations */
if ( valgame.chloc < -1 || valgame.chloc > NLOCATIONS ||
- valgame.chloc < -1 || valgame.chloc > NLOCATIONS ||
+ valgame.chloc2 < -1 || valgame.chloc2 > NLOCATIONS ||
valgame.loc < -1 || valgame.loc > NLOCATIONS ||
valgame.newloc < -1 || valgame.newloc > NLOCATIONS ||
valgame.oldloc < -1 || valgame.oldloc > NLOCATIONS ||
- valgame.oldloc < -1 || valgame.oldloc > NLOCATIONS) {
+ valgame.oldlc2 < -1 || valgame.oldlc2 > NLOCATIONS) {
return false;
}
/* Bounds check for location arrays */