diff --git a/fclauncher/InstanceManager.go b/fclauncher/InstanceManager.go index 305eb13..2c79b15 100644 --- a/fclauncher/InstanceManager.go +++ b/fclauncher/InstanceManager.go @@ -77,7 +77,9 @@ func (i *InstanceManager)checkJavaVersion(instance Instance){ tokens := []int{0, 0, 0} tokens[0], _ = strconv.Atoi(tokensStr[0]) tokens[1], _ = strconv.Atoi(tokensStr[1]) - tokens[2], _ = strconv.Atoi(tokensStr[2]) + if len(tokensStr) > 2 { + tokens[2], _ = strconv.Atoi(tokensStr[2]) + } javaVer := 8 if tokens[1] == 17 { javaVer = 17 diff --git a/fclauncher/Java.go b/fclauncher/Java.go index 50a1c5e..fa918aa 100644 --- a/fclauncher/Java.go +++ b/fclauncher/Java.go @@ -59,7 +59,7 @@ func (j *JavaManager)InstallJavaVer(version int) { if err != nil { return } - target := filepath.Join(path, strings.SplitN(entry.Name, string(os.PathSeparator), 2)[1]) + target := filepath.Join(path, strings.SplitN(entry.Name, "/", 2)[1]) if !entry.IsDir() { rc, err := entry.Open() if err != nil {