Last parameter for DownloadLeaderboardEntries is index inclusive

This commit is contained in:
kamyker 2020-05-18 02:11:15 +02:00
parent 9101b82450
commit b522f5affa

View File

@ -66,7 +66,7 @@ public async Task<LeaderboardEntry[]> GetScoresAsync( int count, int offset = 1
{
if ( offset <= 0 ) throw new System.ArgumentException( "Should be 1+", nameof( offset ) );
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count );
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count - 1 );
if ( !r.HasValue )
return null;