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

glob-star at end results in panic #3

Open
skseth opened this issue Jul 28, 2022 · 0 comments
Open

glob-star at end results in panic #3

skseth opened this issue Jul 28, 2022 · 0 comments

Comments

@skseth
Copy link

skseth commented Jul 28, 2022

Calling fnmatch as follows :

fnmatch.Match("abc.go*", "abc.go", fnmatch.FNM_PATHNAME|fnmatch.FNM_PERIOD)

results in

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

goroutine 1 [running]:
github.com/danwakefield/fnmatch.Match({0x497148, 0x0}, {0x496f74, 0x0}, 0x6)
	/tmp/gopath2132381486/pkg/mod/github.com/danwakefield/[email protected]/fnmatch.go:81 +0x76d
main.main()
	/tmp/sandbox2542232829/prog.go:12 +0x38

Go Playground : https://go.dev/play/p/2mJHotjALA8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant