From f69121357dda1629f543c1788cd0d47f1088c40c Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Sun, 6 Sep 2015 16:25:55 +0200 Subject: [PATCH] cmd/geth Autocompletion bugfix which let the console crash --- cmd/geth/js.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index c31deefdd..3e3600705 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -121,7 +121,7 @@ func keywordCompleter(line string) []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, "" }