mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile. (This part is to detect that no drag actuall happened.)
This commit is contained in:
parent
087a05dd6a
commit
0b5ad41899
2 changed files with 7 additions and 4 deletions
|
@ -1054,10 +1054,11 @@ model_moveBoardToTray( ModelCtxt* model, XP_S16 turn,
|
|||
}
|
||||
} /* model_moveBoardToTray */
|
||||
|
||||
void
|
||||
XP_Bool
|
||||
model_moveTileOnBoard( ModelCtxt* model, XP_S16 turn, XP_U16 colCur,
|
||||
XP_U16 rowCur, XP_U16 colNew, XP_U16 rowNew )
|
||||
{
|
||||
XP_Bool found = XP_FALSE;
|
||||
PlayerCtxt* player = &model->players[turn];
|
||||
XP_S16 index = player->nPending;
|
||||
|
||||
|
@ -1079,10 +1080,12 @@ model_moveTileOnBoard( ModelCtxt* model, XP_S16 turn, XP_U16 colCur,
|
|||
incrPendingTileCountAt( model, colNew, rowNew );
|
||||
|
||||
invalidateScore( model, turn );
|
||||
found = XP_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
} /* model_moveTileOnBoard */
|
||||
|
||||
void
|
||||
model_resetCurrentTurn( ModelCtxt* model, XP_S16 whose )
|
||||
|
|
|
@ -140,8 +140,8 @@ void model_moveBoardToTray( ModelCtxt* model, XP_S16 turn,
|
|||
XP_U16 col, XP_U16 row, XP_U16 trayOffset );
|
||||
void model_moveTrayToBoard( ModelCtxt* model, XP_S16 turn, XP_U16 col,
|
||||
XP_U16 row, XP_S16 tileIndex, Tile blankFace );
|
||||
void model_moveTileOnBoard( ModelCtxt* model, XP_S16 turn, XP_U16 colCur,
|
||||
XP_U16 rowCur, XP_U16 colNew, XP_U16 rowNew );
|
||||
XP_Bool model_moveTileOnBoard( ModelCtxt* model, XP_S16 turn, XP_U16 colCur,
|
||||
XP_U16 rowCur, XP_U16 colNew, XP_U16 rowNew );
|
||||
|
||||
XP_S16 model_trayContains( ModelCtxt* model, XP_S16 turn, Tile tile );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue