fix bug: don't advance arrow if unable to move tile to board (introduced with recent tile index changes)

This commit is contained in:
ehouse 2008-05-24 16:21:03 +00:00
parent c6da605b56
commit 8fa530303a

View file

@ -3173,14 +3173,13 @@ moveKeyTileToBoard( BoardCtxt* board, XP_Key cursorKey, XP_Bool* gotArrow )
Tile blankFace = EMPTY_TILE; Tile blankFace = EMPTY_TILE;
XP_S16 tileIndex = keyToIndex( board, cursorKey, &blankFace ); XP_S16 tileIndex = keyToIndex( board, cursorKey, &blankFace );
if ( tileIndex >= 0 ) { haveDest = (tileIndex >= 0)
haveDest = moveTileToBoard( board, col, row, tileIndex, blankFace ); && moveTileToBoard( board, col, row, tileIndex, blankFace );
}
} }
return haveDest; return haveDest;
} /* moveKeyTileToBoard */ } /* moveKeyTileToBoard */
#endif #endif /* #ifdef KEY_SUPPORT */
static void static void
setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col, XP_U16 row ) setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col, XP_U16 row )