Trim end of line

Fix ArgumentOutOfRangeException when parsing http://osu.ppy.sh/osu/1004136
This commit is contained in:
Bang Sunghwan 2017-10-08 09:42:09 +09:00
parent c22e1520a0
commit 6c5c734ff1

View File

@ -611,7 +611,7 @@ namespace osu.Game.Beatmaps.Formats
CommandTimelineGroup timelineGroup = null; CommandTimelineGroup timelineGroup = null;
string line; string line;
while ((line = stream.ReadLine()) != null) while ((line = stream.ReadLine()?.TrimEnd()) != null)
{ {
if (string.IsNullOrEmpty(line)) if (string.IsNullOrEmpty(line))
continue; continue;