fixed crash, when mods have no basemodversion defined

This commit is contained in:
knoxfighter 2018-08-06 22:29:28 +02:00
parent 0b6fc19e51
commit 72eb0c894b

View File

@ -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
}