From 6a8dc1d62cd2d792f84c3a56a84b44b70f709694 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Mon, 14 Feb 2022 19:06:36 +0100 Subject: [PATCH] allow empty entries in text field --- LoadEntriesWindow.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LoadEntriesWindow.xaml.cs b/LoadEntriesWindow.xaml.cs index fc3e2cf..8681847 100644 --- a/LoadEntriesWindow.xaml.cs +++ b/LoadEntriesWindow.xaml.cs @@ -33,6 +33,9 @@ namespace EliteBGS { List entries = new List(); foreach (string line in lines.Split('\n')) { + if (string.IsNullOrEmpty(line)) { + continue; + } Entry entry = Entry.Parse(line); entries.Add(entry); } @@ -86,6 +89,9 @@ namespace EliteBGS { List entries = new List(); foreach (string line in lines.Split('\n')) { + if (string.IsNullOrEmpty(line)) { + continue; + } Entry entry = Entry.Parse(line); if (Report.IsRelevant(entry)) { entries.Add(entry);