mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Default to none bank if invalid samplebank is specified
This commit is contained in:
parent
f90f2491c3
commit
5b2af7f264
@ -193,10 +193,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
var addBank = (LegacySampleBank)Parsing.ParseInt(split[1]);
|
||||
|
||||
string stringBank = bank.ToString().ToLowerInvariant();
|
||||
if (stringBank == @"none")
|
||||
if (stringBank == @"none" || !Enum.IsDefined(bank))
|
||||
stringBank = null;
|
||||
string stringAddBank = addBank.ToString().ToLowerInvariant();
|
||||
if (stringAddBank == @"none")
|
||||
if (stringAddBank == @"none" || !Enum.IsDefined(addBank))
|
||||
stringAddBank = null;
|
||||
|
||||
bankInfo.BankForNormal = stringBank;
|
||||
|
Loading…
Reference in New Issue
Block a user