aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-03-21 00:48:14 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-03-21 00:48:14 +0100
commitd9368b7a951189a3e859e24026424806c983a9cb (patch)
treebfaed4e7e57a0add94886f4e7b685ca5ec3a32c9 /FICS
parente20e33f9b4fd2e93e5960bfbf56e046bda53a39d (diff)
Deal with move overrun differently
Diffstat (limited to 'FICS')
-rw-r--r--FICS/movecheck.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/FICS/movecheck.c b/FICS/movecheck.c
index a0c9d30..d87b94e 100644
--- a/FICS/movecheck.c
+++ b/FICS/movecheck.c
@@ -967,8 +967,10 @@ has_legal_move(game_state_t *gs)
&numpossible);
break;
}
- if (numpossible >= 500)
+ if (numpossible >= 500) {
fprintf(stderr, "FICS: Possible move overrun\n");
+ return 0;
+ }
for (i = 0; i < numpossible; i++) {
if (legal_andcheck_move(gs, f, r, possiblef[i],
possibler[i]))