1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-10 02:53:39 +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
Unverified
parent 64d92c1557
commit c16dbc05aa
@@ -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;