From 8fa530303a66cbe057708717291b83e5b7af7e38 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 24 May 2008 16:21:03 +0000 Subject: [PATCH] fix bug: don't advance arrow if unable to move tile to board (introduced with recent tile index changes) --- xwords4/common/board.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 3b7d8d883..03f819545 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -3173,14 +3173,13 @@ moveKeyTileToBoard( BoardCtxt* board, XP_Key cursorKey, XP_Bool* gotArrow ) Tile blankFace = EMPTY_TILE; XP_S16 tileIndex = keyToIndex( board, cursorKey, &blankFace ); - if ( tileIndex >= 0 ) { - haveDest = moveTileToBoard( board, col, row, tileIndex, blankFace ); - } + haveDest = (tileIndex >= 0) + && moveTileToBoard( board, col, row, tileIndex, blankFace ); } return haveDest; } /* moveKeyTileToBoard */ -#endif +#endif /* #ifdef KEY_SUPPORT */ static void setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col, XP_U16 row )