1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:07:36 +08:00

Add new error for malformed (too many variables) hit objects during import

This commit is contained in:
MillhioreF 2017-08-09 23:41:22 -05:00
parent 64d92c1557
commit c16dbc05aa

View File

@ -20,6 +20,9 @@ namespace osu.Game.Rulesets.Objects.Legacy
public override HitObject Parse(string text)
{
string[] split = text.Split(',');
if (split.Length > 11)
throw new InvalidOperationException("One or more hit objects were malformed.");
ConvertHitObjectType type = (ConvertHitObjectType)int.Parse(split[3]) & ~ConvertHitObjectType.ColourHax;
bool combo = type.HasFlag(ConvertHitObjectType.NewCombo);
type &= ~ConvertHitObjectType.NewCombo;