aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-09-08 15:33:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-09-08 15:33:09 +0800
commit6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365 (patch)
treef435d175cdc832a5c5f2bb5be1f298643b6e4f93
parente2d7c1a52303ebdd8c2956badad5e600bf93ff33 (diff)
parentf69121357dda1629f543c1788cd0d47f1088c40c (diff)
downloaddexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar.gz
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar.bz2
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar.lz
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar.xz
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.tar.zst
dexon-6fe46cc7439cf55135fb8c7cc6e15dfb63ed2365.zip
Merge pull request #1774 from bas-vk/console-crash
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, ""
}