Fixed array index out of bounds error when logging in

This commit is contained in:
bytedream 2022-02-28 17:56:11 +01:00
parent 647eb075e5
commit 5219f18417

View file

@ -121,7 +121,7 @@ func loadCrunchy() {
} }
split := strings.SplitN(string(body), "\n", 2) split := strings.SplitN(string(body), "\n", 2)
if len(split) == 1 || split[2] == "" { if len(split) == 1 || split[1] == "" {
if crunchy, err = crunchyroll.LoginWithSessionID(split[0], systemLocale(), client); err != nil { if crunchy, err = crunchyroll.LoginWithSessionID(split[0], systemLocale(), client); err != nil {
out.StopProgress(err.Error()) out.StopProgress(err.Error())
os.Exit(1) os.Exit(1)