From 2a5bbc456ca725fc89731e597146270c1d534eed Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Thu, 29 Mar 2012 20:05:51 +1100 Subject: [PATCH] Fix an off-by-one error in load_game() Obviously no one has tried to load a game with MAX_PLAYERS (8) before! --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 4d0d810..f3c29e5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -346,7 +346,7 @@ bool load_game (int num) load_game_read_int(n, n == MAX_Y); load_game_read_int(max_turn, max_turn >= 1); load_game_read_int(turn_number, turn_number >= 1 && turn_number <= max_turn); - load_game_read_int(number_players, number_players >= 1 && number_players < MAX_PLAYERS); + load_game_read_int(number_players, number_players >= 1 && number_players <= MAX_PLAYERS); load_game_read_int(current_player, current_player >= 0 && current_player < number_players); load_game_read_int(first_player, first_player >= 0 && first_player < number_players); load_game_read_int(n, n == MAX_COMPANIES);