mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42: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);
|
||||
return;
|
||||
case Section.Events:
|
||||
handleEvents(line);
|
||||
handleEvent(line);
|
||||
return;
|
||||
case Section.TimingPoints:
|
||||
handleTimingPoints(line);
|
||||
handleTimingPoint(line);
|
||||
return;
|
||||
case Section.HitObjects:
|
||||
handleHitObjects(line);
|
||||
handleHitObject(line);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
}
|
||||
}
|
||||
|
||||
private void handleEvents(string line)
|
||||
private void handleEvent(string line)
|
||||
{
|
||||
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(',');
|
||||
|
||||
@ -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 (parser == null)
|
||||
|
Loading…
Reference in New Issue
Block a user