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.

Mangadex download bug (delimiter) #150

Open
@C9Glax

Description

@C9Glax

Describe the bug

runtime error: index out of range [99] with length 99
The index is always the length. Only occurs with Mangadex
Titles with occurrences (also some weird ones) and index:

  • A Returner's Magic Should Be Special [26]
  • Kaifuku Jutsushi no Yarinaoshi [99]
  • Kumo Desu ga, Nani ka? [91]
  • Kanojo, Okarishimasu [99]
  • Monster no Goshujin-sama [84]
  • Ijiranaide, Nagatoro-san [95]
  • Overlord [79]

Also one full line:

{"level":50,
"time":1675028575839,
"pid":307,
"hostname":"fecb3815dfa6",
"msg":
  "Failed to download the chapter #110 for Ijiranaide, Nagatoro-san. Err:
  Error: Command failed with exit code 2: mangal inline --source Mangadex --query Ijiranaide, Nagatoro-san --manga exact --chapters 110 -d
  panic: runtime error: index out of range [95] with length 95

  goroutine 1 [running]:
  github.com/metafates/mangal/inline.ParseChaptersFilter.func1({0xc000276480?, 0x5f, 0x8d})
    github.com/metafates/mangal/inline/options.go:114 +0x378
  github.com/metafates/mangal/inline.Run(0xc000567c88)
    github.com/metafates/mangal/inline/inline.go:99 +0x474
  github.com/metafates/mangal/cmd.glob..func11(0x1d26c80?, {0x101d881?, 0x9?, 0x9?})
    github.com/metafates/mangal/cmd/inline.go:149 +0x567
  github.com/spf13/cobra.(*Command).execute(0x1d26c80, {0xc0002307e0, 0x9, 0x9})
    github.com/spf13/[email protected]/command.go:920 +0x847
  github.com/spf13/cobra.(*Command).ExecuteC(0x1d2a040)
    github.com/spf13/[email protected]/command.go:1044 +0x3bd
  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 +0x7a
  main.main()
    github.com/metafates/mangal/main.go:13 +0x4d"
}

Reproduction steps

No response

Expected behavior

No response

Additional context

Docker container

Operating System

Linux

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