Skip to content

Commit

Permalink
Merge pull request #119 from knoxfighter/bugfix/modupload
Browse files Browse the repository at this point in the history
fixed crash, when mods have no basemodversion defined
  • Loading branch information
mroote authored Aug 6, 2018
2 parents 0b6fc19 + 72eb0c8 commit f6aed29
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mod_modInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f6aed29

Please sign in to comment.