mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Changed exception check in FilterStringKeyValue
To check for invalid argument conditions
This commit is contained in:
parent
fdc5b49587
commit
efd2fa2291
@ -54,17 +54,15 @@ public LobbyQuery FilterStringKeyValue( string nKey, string nValue )
|
||||
if ( string.IsNullOrEmpty( nKey ) )
|
||||
throw new System.ArgumentException( "Key string provided for LobbyQuery filter is null or empty", nameof( nKey ) );
|
||||
|
||||
if ( nKey.Length <= SteamMatchmaking.MaxLobbyKeyLength )
|
||||
{
|
||||
stringFilter = new MatchMakingKeyValuePair_t
|
||||
{
|
||||
Key = nKey,
|
||||
Value = nValue
|
||||
};
|
||||
}
|
||||
else
|
||||
if ( nKey.Length > SteamMatchmaking.MaxLobbyKeyLength )
|
||||
throw new System.ArgumentException( "Key length is longer than MaxLobbyKeyLength", nameof( nKey ) );
|
||||
|
||||
stringFilter = new MatchMakingKeyValuePair_t
|
||||
{
|
||||
Key = nKey,
|
||||
Value = nValue
|
||||
};
|
||||
|
||||
return this;
|
||||
}
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user