cmd/geth Autocompletion bugfix which let the console crash

This commit is contained in:
Bas van Kervel 2015-09-06 16:25:55 +02:00
parent e2d7c1a523
commit f69121357d

View File

@ -121,7 +121,7 @@ func keywordCompleter(line string) []string {
} }
func apiWordCompleter(line string, pos int) (head string, completions []string, tail string) { func apiWordCompleter(line string, pos int) (head string, completions []string, tail string) {
if len(line) == 0 { if len(line) == 0 || pos == 0 {
return "", nil, "" return "", nil, ""
} }