- return (GlobalState.matching_game_number > 0 &&
- GlobalState.num_games_matched == GlobalState.matching_game_number);
+ return ((file_type != ECOFILE && at_end_of_input()) ||
+ (GlobalState.matching_game_number > 0 &&
+ GlobalState.num_games_matched == GlobalState.matching_game_number));