mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
don't store argv element in game data structure where it gets freed.
This commit is contained in:
parent
6758ebcdf5
commit
a86ab69aec
2 changed files with 4 additions and 3 deletions
|
@ -1498,7 +1498,7 @@ main( int argc, char** argv )
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case CMD_PLAYERDICT:
|
case CMD_PLAYERDICT:
|
||||||
mainParams.gi.players[nPlayerDicts++].dictName = optarg;
|
mainParams.playerDictNames[nPlayerDicts++] = optarg;
|
||||||
break;
|
break;
|
||||||
case CMD_SEED:
|
case CMD_SEED:
|
||||||
seed = atoi(optarg);
|
seed = atoi(optarg);
|
||||||
|
@ -1778,11 +1778,11 @@ main( int argc, char** argv )
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ii = 0; ii < nPlayerDicts; ++ii ) {
|
for ( ii = 0; ii < nPlayerDicts; ++ii ) {
|
||||||
XP_UCHAR* name = mainParams.gi.players[ii].dictName;
|
const XP_UCHAR* name = mainParams.playerDictNames[ii];
|
||||||
if ( !!name ) {
|
if ( !!name ) {
|
||||||
mainParams.dicts.dicts[ii] =
|
mainParams.dicts.dicts[ii] =
|
||||||
linux_dictionary_make( MPPARM(mainParams.util->mpool) name,
|
linux_dictionary_make( MPPARM(mainParams.util->mpool) name,
|
||||||
mainParams.useMmap );
|
mainParams.useMmap );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ typedef struct LaunchParams {
|
||||||
CurGameInfo gi;
|
CurGameInfo gi;
|
||||||
PlayerDicts dicts;
|
PlayerDicts dicts;
|
||||||
char* fileName;
|
char* fileName;
|
||||||
|
const XP_UCHAR* playerDictNames[MAX_NUM_PLAYERS];
|
||||||
#ifdef USE_SQLITE
|
#ifdef USE_SQLITE
|
||||||
char* dbFileName;
|
char* dbFileName;
|
||||||
XP_U32 dbFileID;
|
XP_U32 dbFileID;
|
||||||
|
|
Loading…
Add table
Reference in a new issue