mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-26 07:58:52 +01:00
fix crash using older dict by using current stream version rather than
one from before gameSeconds was being preserved in the stream by write_gi code. I fixed this on a branch a week ago as well, so look for a merge glitch. Need now to confirm that I'm sending char lists in initial connect message in the right (null-separated utf8) format.
This commit is contained in:
parent
92e02c9c2e
commit
f5ac51ae73
1 changed files with 2 additions and 9 deletions
|
@ -1043,14 +1043,8 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream )
|
|||
XP_U32 gameID;
|
||||
PoolContext* pool;
|
||||
|
||||
/* version */
|
||||
/* version; any dependencies here? */
|
||||
XP_U8 streamVersion = stream_getU8( stream );
|
||||
XP_ASSERT( streamVersion == STREAM_VERS_41B4
|
||||
|| streamVersion == STREAM_VERS_UTF8);
|
||||
if ( (streamVersion != STREAM_VERS_41B4)
|
||||
&& (streamVersion != STREAM_VERS_UTF8) ) {
|
||||
return XP_FALSE;
|
||||
}
|
||||
stream_setVersion( stream, streamVersion );
|
||||
|
||||
gameID = stream_getU32( stream );
|
||||
|
@ -1189,8 +1183,7 @@ server_sendInitialMessage( ServerCtxt* server )
|
|||
|
||||
/* write version for server's benefit; use old version until format
|
||||
changes */
|
||||
stream_putU8( stream, dict_isUTF8(dict)?
|
||||
STREAM_VERS_UTF8:STREAM_VERS_41B4 );
|
||||
stream_putU8( stream, CUR_STREAM_VERS );
|
||||
|
||||
XP_LOGF( "putting gameID %lx into msg", gameID );
|
||||
stream_putU32( stream, gameID );
|
||||
|
|
Loading…
Add table
Reference in a new issue