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