Recommended fixes (obsolete try/catch, fix infinite loop during variable parsing in a better way)

This commit is contained in:
MillhioreF
2017-08-13 00:40:05 -05:00
parent e42c279229
commit e216bfcf10
2 changed files with 5 additions and 9 deletions

View File

@ -222,8 +222,9 @@ namespace osu.Game.Beatmaps.Formats
/// <param name="line">The line which may contains variables.</param>
private void decodeVariables(ref string line)
{
if (line.IndexOf('$') >= 0)
while (line.IndexOf('$') >= 0)
{
string origLine = line;
string[] split = line.Split(',');
for (int i = 0; i < split.Length; i++)
{
@ -233,6 +234,7 @@ namespace osu.Game.Beatmaps.Formats
}
line = string.Join(",", split);
if (line == origLine) break;
}
}