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

Fix empty command panic, help for wrong "show" subcommand #5

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

thaarok
Copy link

@thaarok thaarok commented Dec 10, 2021

Current version will crash when I press Enter on empty command line.

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

goroutine 1 [running]:
main.main()
	/home/jkalina/Fantom/leveldb/leveldb-cli/main.go:84 +0xedc

Also when I try to use "show prefix" as "show (thePrefixIwantToFind)", no message is printed.

genesis» show myprefix
genesis»

This PR fixes both.

@liderman
Copy link
Owner

Hi, @hkalina!
Thanks for the fix

@liderman liderman merged commit 8656897 into liderman:master Dec 18, 2021
@thaarok thaarok deleted the fixempty branch December 18, 2021 18:20
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

Successfully merging this pull request may close these issues.

2 participants