mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
fix assertion failure that happened when I changed whether remote
scores were shown mid-game. If the value's not as expected just don't show the score.
This commit is contained in:
parent
da6d7da350
commit
d2fda267e5
1 changed files with 37 additions and 38 deletions
|
@ -809,6 +809,7 @@ postponeRobotMove( ServerCtxt* server )
|
||||||
static void
|
static void
|
||||||
showPrevScore( ServerCtxt* server )
|
showPrevScore( ServerCtxt* server )
|
||||||
{
|
{
|
||||||
|
if ( server->nv.showRobotScores ) { /* this can be changed between turns */
|
||||||
XW_UtilCtxt* util = server->vol.util;
|
XW_UtilCtxt* util = server->vol.util;
|
||||||
XWStreamCtxt* stream;
|
XWStreamCtxt* stream;
|
||||||
const XP_UCHAR* str;
|
const XP_UCHAR* str;
|
||||||
|
@ -818,8 +819,6 @@ showPrevScore( ServerCtxt* server )
|
||||||
XP_U16 strCode;
|
XP_U16 strCode;
|
||||||
LocalPlayer* lp;
|
LocalPlayer* lp;
|
||||||
|
|
||||||
XP_ASSERT( server->nv.showRobotScores );
|
|
||||||
|
|
||||||
prevTurn = (server->nv.currentTurn + nPlayers - 1) % nPlayers;
|
prevTurn = (server->nv.currentTurn + nPlayers - 1) % nPlayers;
|
||||||
lp = &gi->players[prevTurn];
|
lp = &gi->players[prevTurn];
|
||||||
|
|
||||||
|
@ -850,7 +849,7 @@ showPrevScore( ServerCtxt* server )
|
||||||
|
|
||||||
(void)util_userQuery( util, QUERY_ROBOT_MOVE, stream );
|
(void)util_userQuery( util, QUERY_ROBOT_MOVE, stream );
|
||||||
stream_destroy( stream );
|
stream_destroy( stream );
|
||||||
|
}
|
||||||
SETSTATE( server, server->vol.stateAfterShow );
|
SETSTATE( server, server->vol.stateAfterShow );
|
||||||
} /* showPrevScore */
|
} /* showPrevScore */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue