aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-09-06 22:25:55 +0800
committerBas van Kervel <bas@ethdev.com>2015-09-06 22:25:55 +0800
commitf69121357dda1629f543c1788cd0d47f1088c40c (patch)
treef435d175cdc832a5c5f2bb5be1f298643b6e4f93
parente2d7c1a52303ebdd8c2956badad5e600bf93ff33 (diff)
downloaddexon-f69121357dda1629f543c1788cd0d47f1088c40c.tar.gz
dexon-f69121357dda1629f543c1788cd0d47f1088c40c.tar.zst
dexon-f69121357dda1629f543c1788cd0d47f1088c40c.zip
cmd/geth Autocompletion bugfix which let the console crash
-rw-r--r--cmd/geth/js.go2
1 files changed, 1 insertions, 1 deletions
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, ""
}