From 342c3ea565e6a2bdb0cec96b4beb683063d251c7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 22 Sep 2020 21:01:32 -0700 Subject: [PATCH] Do not panic if there is no text on the line; closes pterodactyl/panel#2369 --- parser/parser.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parser/parser.go b/parser/parser.go index ffb31e7..334b8c6 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -437,8 +437,7 @@ func (f *ConfigurationFile) parsePropertiesFile(path string) error { scanner := bufio.NewScanner(f2) for scanner.Scan() { text := scanner.Text() - - if text[0] != '#' { + if len(text) > 0 && text[0] != '#' { break }