mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
Merge pull request #1247 from maxdelayer/main
Fix edge case where leaderboard viewing would cause unhandled exception
This commit is contained in:
commit
c708246f73
@ -193,7 +193,7 @@ void Leaderboard::SetupLeaderboard(bool weekly, uint32_t resultStart, uint32_t r
|
|||||||
SELECT leaderboardsRanked.*, character_id, UNIX_TIMESTAMP(last_played) as lastPlayed, leaderboardsRanked.name, leaderboardsRanked.ranking FROM leaderboardsRanked, myStanding, lowestRanking
|
SELECT leaderboardsRanked.*, character_id, UNIX_TIMESTAMP(last_played) as lastPlayed, leaderboardsRanked.name, leaderboardsRanked.ranking FROM leaderboardsRanked, myStanding, lowestRanking
|
||||||
WHERE leaderboardsRanked.ranking
|
WHERE leaderboardsRanked.ranking
|
||||||
BETWEEN
|
BETWEEN
|
||||||
LEAST(GREATEST(CAST(myRank AS SIGNED) - 5, %i), lowestRanking.lowestRank - 9)
|
LEAST(GREATEST(CAST(myRank AS SIGNED) - 5, %i), CAST(lowestRanking.lowestRank AS SIGNED) - 9)
|
||||||
AND
|
AND
|
||||||
LEAST(GREATEST(myRank + 5, %i), lowestRanking.lowestRank)
|
LEAST(GREATEST(myRank + 5, %i), lowestRanking.lowestRank)
|
||||||
ORDER BY ranking ASC;
|
ORDER BY ranking ASC;
|
||||||
|
Loading…
Reference in New Issue
Block a user