Skip to content

Commit f94c000

Browse files
committed
fix: @ENDHEAD后面有空格时的鲁棒性优化
1 parent 1f5d9c5 commit f94c000

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

parser/chu/UgcParser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override (ChuChart, List<Alert>) Parse(string text)
3434

3535
if (inHeader)
3636
{
37-
if (line == "@ENDHEAD")
37+
if (line.StartsWith("@ENDHEAD"))
3838
{
3939
inHeader = false;
4040
continue;
@@ -183,8 +183,8 @@ private void ParseHeaderLine(string line, ChuChart chart, List<Alert> alerts, in
183183
case "@EXVER": case "@SORT": case "@BGM": case "@BGMOFS": case "@BGMPRV":
184184
case "@JACKET": case "@BGIMG": case "@BGMODE": case "@FLDCOL": case "@FLDIMG":
185185
case "@FLAG": case "@ATINFO": case "@DLURL": case "@COPYRIGHT": case "@LICENSE":
186-
case "@MAINTIL": case "@TIL":
187-
case "@MAINBPM": case "@USETIL": case "@ENDHEAD":
186+
case "@MAINTIL": case "@TIL": case "@USETIL":
187+
case "@MAINBPM":
188188
case "@BGSCENE": case "@FLDSCENE": case "@RLDATE": case "@CMT":
189189
break;
190190

0 commit comments

Comments
 (0)