2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 11:19:59 +01:00

filesystem: only allow setting true or false for boolean type keys in gameinfo/liblist.gam

This commit is contained in:
Alibek Omarov 2023-10-27 07:24:42 +03:00
parent a8fc9a4c5a
commit 83a5648335

View File

@ -770,13 +770,13 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
else if( !Q_stricmp( token, "secure" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->secure = Q_atoi( token );
GameInfo->secure = Q_atoi( token ) ? true : false;
}
// valid for both
else if( !Q_stricmp( token, "nomodels" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->nomodels = Q_atoi( token );
GameInfo->nomodels = Q_atoi( token ) ? true : false;
}
else if( !Q_stricmp( token, isGameInfo ? "max_edicts" : "edicts" ))
{
@ -844,17 +844,17 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
else if( !Q_stricmp( token, "noskills" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->noskills = Q_atoi( token );
GameInfo->noskills = Q_atoi( token ) ? true : false;
}
else if( !Q_stricmp( token, "render_picbutton_text" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->render_picbutton_text = Q_atoi( token );
GameInfo->render_picbutton_text = Q_atoi( token ) ? true : false;
}
else if( !Q_stricmp( token, "internal_vgui_support" ))
{
pfile = COM_ParseFile( pfile, token, sizeof( token ));
GameInfo->internal_vgui_support = Q_atoi( token );
GameInfo->internal_vgui_support = Q_atoi( token ) ? true : false;
}
else if( !Q_stricmp( token, "quicksave_aged_count" ))
{