From 0dc39b5d856c2c2e90390c98d963d9443cd1ef53 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 21 Apr 2020 22:28:20 -0700 Subject: [PATCH] clear pending move before applying phonies rejection If slow network traffic has given a guest time to move tiles to the board while the host decides its last move must be rejected, those tiles must be removed before the rejected turn can be undone. --- xwords4/common/model.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xwords4/common/model.c b/xwords4/common/model.c index 4f9cc6445..9be742dd0 100644 --- a/xwords4/common/model.c +++ b/xwords4/common/model.c @@ -902,6 +902,8 @@ model_rejectPreviousMove( ModelCtxt* model, PoolContext* pool, XP_U16* turn ) stack_popEntry( stack, &entry ); XP_ASSERT( entry.moveType == MOVE_TYPE ); + model_resetCurrentTurn( model, entry.playerNum ); + replaceNewTiles( model, pool, entry.playerNum, &entry.u.move.newTiles ); XP_ASSERT( !model->vol.gi->inDuplicateMode ); undoFromMove( model, entry.playerNum, blankTile, &entry.u.move );