mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
fix b5 crasher: check for stream equivalence with the older version
now that current version's been upped. Rename old version to better indicate when it was current.
This commit is contained in:
parent
3e06bc56f7
commit
942979ddd0
4 changed files with 5 additions and 10 deletions
|
@ -208,7 +208,7 @@ board_makeFromStream( MPFORMAL XWStreamCtxt* stream, ModelCtxt* model,
|
|||
#endif
|
||||
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
if ( stream_getVersion( stream ) >= CUR_STREAM_VERS ) {
|
||||
if ( stream_getVersion( stream ) >= STREAM_VERS_41b4 ) {
|
||||
board->hasHintRect[i] = stream_getBits( stream, 1 );
|
||||
} else {
|
||||
board->hasHintRect[i] = XP_FALSE;
|
||||
|
|
|
@ -380,19 +380,14 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi )
|
|||
gi->phoniesAction = (XWPhoniesChoice)stream_getBits( stream, 2 );
|
||||
gi->timerEnabled = stream_getBits( stream, 1 );
|
||||
|
||||
if ( strVersion >= CUR_STREAM_VERS ) {
|
||||
if ( strVersion >= STREAM_VERS_41b4 ) {
|
||||
gi->allowPickTiles = stream_getBits( stream, 1 );
|
||||
} else {
|
||||
gi->allowPickTiles = XP_FALSE;
|
||||
}
|
||||
|
||||
if ( strVersion >= CUR_STREAM_VERS ) {
|
||||
gi->allowHintRect = stream_getBits( stream, 1 );
|
||||
} else {
|
||||
gi->allowPickTiles = XP_FALSE;
|
||||
gi->allowHintRect = XP_FALSE;
|
||||
}
|
||||
|
||||
|
||||
gi->gameID = stream_getU16( stream );
|
||||
if ( gi->timerEnabled ) {
|
||||
gi->gameSeconds = stream_getU16( stream );
|
||||
|
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
|
||||
#define CUR_STREAM_VERS 0x03
|
||||
|
||||
#define STREAM_VERS_41 0x02
|
||||
#define STREAM_VERS_41b4 0x02
|
||||
#define STREAM_VERS_405 0x01
|
||||
|
||||
typedef struct LocalPlayer {
|
||||
|
|
|
@ -236,7 +236,7 @@ getNV( XWStreamCtxt* stream, ServerNonvolatiles* nv, XP_U16 nPlayers )
|
|||
(void)stream_getBits( stream, 3 ); /* was npassesinrow */
|
||||
|
||||
nv->nDevices = (XP_U8)stream_getBits( stream, NDEVICES_NBITS );
|
||||
if ( stream_getVersion( stream ) > STREAM_VERS_41 ) {
|
||||
if ( stream_getVersion( stream ) > STREAM_VERS_41b4 ) {
|
||||
++nv->nDevices;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue