From 72eb0c894b13b5898511169893e133afe07c002b Mon Sep 17 00:00:00 2001 From: knoxfighter Date: Mon, 6 Aug 2018 22:29:28 +0200 Subject: [PATCH] fixed crash, when mods have no basemodversion defined --- src/mod_modInfo.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mod_modInfo.go b/src/mod_modInfo.go index 98bcb832..894c14f3 100644 --- a/src/mod_modInfo.go +++ b/src/mod_modInfo.go @@ -77,6 +77,13 @@ func (modInfoList *ModInfoList) listInstalledMods() error { var baseDependency string for _, dependency := range modInfo.Dependencies { if strings.HasPrefix(dependency, "base") { + splittedDep := strings.Split(dependency, "=") + + if len(splittedDep) == 1 { + log.Printf("basemod without version specified!") + break + } + baseDependency = strings.Split(dependency, "=")[1] break }