mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Fix trimming too early in OsuLegacyDecoder crashing storyboards
This commit is contained in:
parent
b1a2da58bc
commit
29c2a29798
@ -611,9 +611,9 @@ namespace osu.Game.Beatmaps.Formats
|
||||
CommandTimelineGroup timelineGroup = null;
|
||||
|
||||
string line;
|
||||
while ((line = stream.ReadLine()?.Trim()) != null)
|
||||
while ((line = stream.ReadLine()) != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(line))
|
||||
if (string.IsNullOrEmpty(line.Trim()))
|
||||
continue;
|
||||
|
||||
if (line.StartsWith("//"))
|
||||
@ -679,10 +679,12 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
private KeyValuePair<string, string> splitKeyVal(string line, char separator)
|
||||
{
|
||||
var split = line.Trim().Split(separator);
|
||||
|
||||
return new KeyValuePair<string, string>
|
||||
(
|
||||
line.Remove(line.IndexOf(separator)).Trim(),
|
||||
line.Substring(line.IndexOf(separator) + 1).Trim()
|
||||
split[0].Trim(),
|
||||
split.Length > 1 ? split[1].Trim() : string.Empty
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user