diff --git a/sgfw/icons.go b/sgfw/icons.go index 0366e7a..9fea2b0 100644 --- a/sgfw/icons.go +++ b/sgfw/icons.go @@ -67,7 +67,7 @@ func loadDesktopFile(path string) { } else if len(line) > 0 && line[0] == '[' { inDE = false } - if inDE && strings.HasPrefix(line, "Exec=") { + if inDE && len(line) > 5 && strings.HasPrefix(line, "Exec=") { exec = strings.Fields(line[5:])[0] } if inDE && strings.HasPrefix(line, "Icon=") {