summaryrefslogtreecommitdiffstats
path: root/mbbsd/chess.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/chess.c')
-rw-r--r--mbbsd/chess.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index 1c5b44d1..56124c42 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -655,10 +655,9 @@ ChessPlayFuncHis(ChessInfo* info)
game_result = CHESS_RESULT_WIN;
endturn = 1;
} else if (result == CHESS_STEP_PASS) {
- ChessStepType type = CHESS_STEP_PASS;
strcpy(info->last_movestr, "µê¤â");
- info->pass[info->turn] = 1;
+ info->pass[(int) info->turn] = 1;
endturn = 1;
} else if (result == CHESS_STEP_TIE) {
if (ChessAnswerRequest(info, "©M´Ñ")) {
@@ -684,7 +683,7 @@ ChessPlayFuncHis(ChessInfo* info)
game_result = CHESS_RESULT_CONTINUE;
}
endturn = 1;
- info->pass[info->turn] = 0;
+ info->pass[(int) info->turn] = 0;
ChessStepMade(info, 1);
info->actions->drawstep(info, &info->step_tmp);
} else if (result == CHESS_STEP_UNDO_ACC) {
@@ -1255,9 +1254,13 @@ ChessReplayGame(const char* fname)
info = ChessReplayMap[found].func(fp);
fclose(fp);
- screen_backup(&oldscreen);
- ChessPlay(info);
- screen_restore(&oldscreen);
+ if (info) {
+ screen_backup(&oldscreen);
+ ChessPlay(info);
+ screen_restore(&oldscreen);
+
+ DeleteChessInfo(info);
+ }
return 0;
}