Skip to content

Commit f691213

Browse files
author
Bas van Kervel
committed
cmd/geth Autocompletion bugfix which let the console crash
1 parent e2d7c1a commit f691213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/geth/js.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func keywordCompleter(line string) []string {
121121
}
122122

123123
func apiWordCompleter(line string, pos int) (head string, completions []string, tail string) {
124-
if len(line) == 0 {
124+
if len(line) == 0 || pos == 0 {
125125
return "", nil, ""
126126
}
127127

0 commit comments

Comments
 (0)