mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Actually throw on invalid input
Handling duplicates is fine, but this is userspace error
This commit is contained in:
@@ -518,11 +518,11 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||
#pragma warning restore CA1508 // False positive, not every IReadOnlyCollection is ISet
|
||||
|
||||
foreach (uint gameID in uniqueValidGameIDs) {
|
||||
request.Body.games_played.Add(new CMsgClientGamesPlayed.GamePlayed { game_id = new GameID(gameID) });
|
||||
|
||||
if (request.Body.games_played.Count >= maxGamesCount) {
|
||||
break;
|
||||
throw new InvalidOperationException(nameof(maxGamesCount));
|
||||
}
|
||||
|
||||
request.Body.games_played.Add(new CMsgClientGamesPlayed.GamePlayed { game_id = new GameID(gameID) });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user