Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic if oper-classes title information is left blank #1714

Closed
erikh opened this issue Jun 27, 2021 · 0 comments
Closed

Panic if oper-classes title information is left blank #1714

erikh opened this issue Jun 27, 2021 · 0 comments
Labels
Milestone

Comments

@erikh
Copy link

erikh commented Jun 27, 2021

My config:

oper-classes:
   "foo":
     title:

error:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/ergochat/ergo/irc.(*Config).OperatorClasses(0xc0001ba400, 0xc0002b6300, 0xc, 0xc00023c8b8)
        /go/src/github.com/ergochat/ergo/irc/config.go:757 +0xaf6
github.com/ergochat/ergo/irc.LoadConfig(0xc000178177, 0x9, 0x9c4ee4, 0x6, 0xc00014b048)
        /go/src/github.com/ergochat/ergo/irc/config.go:1425 +0xe5e
main.main()
        /go/src/github.com/ergochat/ergo/ergo.go:146 +0x7c5

problem is the [0] in the title here:

https://github.com/ergochat/ergo/blob/stable/irc/config.go#L757

@slingamn slingamn added the bug label Jun 28, 2021
@slingamn slingamn added this to the v2.8 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants