appendGameOverReasonToCmdlist 对 phase 判断由 assert 改为 if

This commit is contained in:
Calcitem 2020-10-23 22:41:48 +08:00
parent 3726ad9635
commit f3eb5b3322
1 changed files with 3 additions and 1 deletions

View File

@ -1423,7 +1423,9 @@ inline std::string GameController::char_to_string(char ch)
void GameController::appendGameOverReasonToCmdlist() void GameController::appendGameOverReasonToCmdlist()
{ {
assert(position.phase == PHASE_GAMEOVER); if (position.phase != PHASE_GAMEOVER) {
return;
}
char cmdline[64] = { 0 }; char cmdline[64] = { 0 };
switch (position.gameoverReason) { switch (position.gameoverReason) {