From 5f96bd7a8069db4321ded44f5ab8e2399dd17f6e Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 14 Dec 2023 22:31:27 +0100 Subject: Fixed compiler warning --- FICS/movecheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FICS') diff --git a/FICS/movecheck.c b/FICS/movecheck.c index 4d0ecd0..fa2436d 100644 --- a/FICS/movecheck.c +++ b/FICS/movecheck.c @@ -760,7 +760,7 @@ has_legal_move(game_state_t *gs) { int f, r; int i; - int kf, kr; + int kf = 0, kr = -1; int kf_and_kr_set = 0; int numpossible = 0; int possiblef[500]; @@ -806,7 +806,7 @@ has_legal_move(game_state_t *gs) } } - if (!kf_and_kr_set) { + if (!kf_and_kr_set && kf == 0 && kr == -1) { fprintf(stderr, "FICS: %s: 'kf_and_kr_set' is 0\n", __func__); return 0; } -- cgit v1.2.3