Compare commits

..

2 commits

Author SHA1 Message Date
e7044e21e9 NEX ragebait again
All checks were successful
Build and Test / splatoon (push) Successful in 4m35s
Build and Test / friends (push) Successful in 6m10s
Build and Test / super-mario-maker (push) Successful in 10m54s
2026-04-27 03:46:41 +02:00
12ce2e59c0 NEX ragebait 2026-04-27 03:46:23 +02:00

View file

@ -669,6 +669,12 @@ impl Ranking for User {
} }
}; };
let offset = param.range.offset as usize;
let size = param.range.size as usize;
let start = offset.min(results.len());
let end = (start + size).min(results.len());
let team_votes = fetch_team_votes(fest_id)?; let team_votes = fetch_team_votes(fest_id)?;
let mut wins = vec![0u32, 0u32]; let mut wins = vec![0u32, 0u32];
for r in &results { for r in &results {
@ -678,7 +684,7 @@ impl Ranking for User {
}; };
} }
let score_data: Vec<CompetitionRankingScoreData> = results let score_data: Vec<CompetitionRankingScoreData> = results[start..end]
.iter() .iter()
.map(|r| CompetitionRankingScoreData { .map(|r| CompetitionRankingScoreData {
unk: 1, unk: 1,