From 8d0b39774ee4f9cb2de3f0f1ce88e3d59f82dd90 Mon Sep 17 00:00:00 2001 From: veroxzik <43590004+veroxzik@users.noreply.github.com> Date: Mon, 5 Dec 2022 20:53:16 -0500 Subject: [PATCH] fix: crash on empty lines in *.mer --- BAKKA-Editor/Chart.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BAKKA-Editor/Chart.cs b/BAKKA-Editor/Chart.cs index cef3784..0d77b51 100644 --- a/BAKKA-Editor/Chart.cs +++ b/BAKKA-Editor/Chart.cs @@ -80,6 +80,9 @@ namespace BAKKA_Editor Dictionary refByLine = new(); for (int i = index; i < file.Length; i++) { + if (String.IsNullOrWhiteSpace(file[i])) + continue; + var parsed = file[i].Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); NoteBase temp = new(); temp.BeatInfo = new BeatInfo(Convert.ToInt32(parsed[0]), Convert.ToInt32(parsed[1]));