1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Apply clamping suggestion

Co-Authored-By: peppy <pe@ppy.sh>
This commit is contained in:
Dan Balasescu 2019-03-13 12:35:05 +09:00 committed by GitHub
parent 0241148385
commit a35d9ccc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
bankInfo.CustomSampleBank = Parsing.ParseInt(split[2]);
if (split.Length > 3)
bankInfo.Volume = Parsing.ParseInt(split[3]);
bankInfo.Volume = Math.Max(0, Parsing.ParseInt(split[3]));
bankInfo.Filename = split.Length > 4 ? split[4] : null;
}