Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

panic: runtime error: index out of range #196

Open
@glottisfaun0000

Description

@glottisfaun0000

Describe the bug

With Mangadex, I'm getting a ton of failed downloads (originally encountered in Kaizoku but the same when running mangal directly) with errors like this:

 mangal inline --source Mangadex --query Tengoku Daimakyou --manga exact --chapters 135 -d
panic: runtime error: index out of range [16] with length 16

goroutine 1 [running]:
github.com/metafates/mangal/inline.ParseChaptersFilter.func1({0x14000276480?, 0x10, 0x10})
	github.com/metafates/mangal/inline/options.go:114 +0x390
github.com/metafates/mangal/inline.Run(0x1400001bc68)
	github.com/metafates/mangal/inline/inline.go:99 +0x400
github.com/metafates/mangal/cmd.glob..func11(0x104078b60?, {0x1032239e3?, 0xa?, 0xa?})
	github.com/metafates/mangal/cmd/inline.go:149 +0x4a4
github.com/spf13/cobra.(*Command).execute(0x104078b60, {0x14000481e00, 0xa, 0xa})
	github.com/spf13/[email protected]/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x10407bf20)
	github.com/spf13/[email protected]/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:968
github.com/metafates/mangal/cmd.Execute()
	github.com/metafates/mangal/cmd/root.go:112 +0x94
main.main()
	github.com/metafates/mangal/main.go:13 +0x54

Curious if this is a problem with Mangadex (I've confirmed X chapter does exist on the site), or a mangal known bug.

Reproduction steps

mangal inline --source Mangadex --query Tengoku Daimakyou --manga exact --chapters 135 -d

Expected behavior

Chapter is downloaded

Additional context

Running via homebrew on macOS, same behavior in Kaizoku via docker

Operating System

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions