diff --git a/AssParser.Lib/AssParser.Lib.csproj b/AssParser.Lib/AssParser.Lib.csproj index 4a72105..c54429d 100644 --- a/AssParser.Lib/AssParser.Lib.csproj +++ b/AssParser.Lib/AssParser.Lib.csproj @@ -1,7 +1,7 @@ - + - net7.0 + net7.0;net6.0 enable enable README.md diff --git a/AssParser.Lib/AssParser.cs b/AssParser.Lib/AssParser.cs index ca7aa7f..91c6095 100644 --- a/AssParser.Lib/AssParser.cs +++ b/AssParser.Lib/AssParser.cs @@ -45,7 +45,8 @@ public static async Task ParseAssFile(StreamReader assStream) { continue; } - if (tag is not ['[', .., ']']) + //if (tag is not ['[', .., ']']) //.net 7+ only + if (!tag.StartsWith('[') || !tag.EndsWith(']')) { throw new AssParserException($"{tag} is not a valid section name", assStream, lineCount, AssParserErrorType.InvalidSection); }