mirror of
https://github.com/ppy/osu.git
synced 2026-05-22 04:09:54 +08:00
Fix classic scoring overflowing in osu! ruleset due to integer multiplication overflow
Closes https://github.com/ppy/osu/issues/25545.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
switch (rulesetId)
|
||||
{
|
||||
case 0:
|
||||
return (long)Math.Round((objectCount * objectCount * 32.57 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
return (long)Math.Round((Math.Pow(objectCount, 2) * 32.57 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
|
||||
case 1:
|
||||
return (long)Math.Round((objectCount * 1109 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
|
||||
Reference in New Issue
Block a user