diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index a4a41f50..acf932a8 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -2788,7 +2788,7 @@ static void GAME_EXPORT PlayerInfo_SetValueForKey( const char *key, const char * { Cvar_DirectSet( var, value ); } - else if( Info_SetValueForStarKey( cls.userinfo, key, value, MAX_INFO_STRING )) + else if( Info_SetValueForStarKey( cls.userinfo, key, value, sizeof( cls.userinfo ))) { // time to update server copy of userinfo CL_UpdateInfo( key, value ); diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 89c527b2..6158e371 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -2781,7 +2781,7 @@ static void CL_SetInfo_f( void ) { Cvar_DirectSet( var, Cmd_Argv( 2 )); } - else if( Info_SetValueForKey( cls.userinfo, Cmd_Argv( 1 ), Cmd_Argv( 2 ), MAX_INFO_STRING )) + else if( Info_SetValueForKey( cls.userinfo, Cmd_Argv( 1 ), Cmd_Argv( 2 ), sizeof( cls.userinfo ))) { // send update only on successfully changed userinfo Cmd_ForwardToServer (); diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index 78f00623..6064fb3c 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -532,10 +532,10 @@ edict_t *GAME_EXPORT SV_FakeConnect( const char *netname ) userinfo[0] = '\0'; // setup fake client params - Info_SetValueForKey( userinfo, "name", netname, MAX_INFO_STRING ); - Info_SetValueForKey( userinfo, "model", "gordon", MAX_INFO_STRING ); - Info_SetValueForKey( userinfo, "topcolor", "1", MAX_INFO_STRING ); - Info_SetValueForKey( userinfo, "bottomcolor", "1", MAX_INFO_STRING ); + Info_SetValueForKey( userinfo, "name", netname, sizeof( userinfo )); + Info_SetValueForKey( userinfo, "model", "gordon", sizeof( userinfo )); + Info_SetValueForKey( userinfo, "topcolor", "1", sizeof( userinfo )); + Info_SetValueForKey( userinfo, "bottomcolor", "1", sizeof( userinfo )); // build a new connection // accept the new client