mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 08:22:56 +08:00
Merge pull request #2342 from smoogipoo/fix-formatexception-beatmap
Handle possible FormatException when parsing timing points
This commit is contained in:
commit
25524bf24f
@ -81,13 +81,13 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
handleDifficulty(line);
|
handleDifficulty(line);
|
||||||
return;
|
return;
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvents(line);
|
handleEvent(line);
|
||||||
return;
|
return;
|
||||||
case Section.TimingPoints:
|
case Section.TimingPoints:
|
||||||
handleTimingPoints(line);
|
handleTimingPoint(line);
|
||||||
return;
|
return;
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
handleHitObjects(line);
|
handleHitObject(line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEvents(string line)
|
private void handleEvent(string line)
|
||||||
{
|
{
|
||||||
string[] split = line.Split(',');
|
string[] split = line.Split(',');
|
||||||
|
|
||||||
@ -275,7 +275,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleTimingPoints(string line)
|
private void handleTimingPoint(string line)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
string[] split = line.Split(',');
|
string[] split = line.Split(',');
|
||||||
|
|
||||||
@ -360,8 +362,12 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (FormatException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void handleHitObjects(string line)
|
private void handleHitObject(string line)
|
||||||
{
|
{
|
||||||
// If the ruleset wasn't specified, assume the osu!standard ruleset.
|
// If the ruleset wasn't specified, assume the osu!standard ruleset.
|
||||||
if (parser == null)
|
if (parser == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user