Skip to content

Commit 6fe46cc

Browse files
committed
Merge pull request #1774 from bas-vk/console-crash
cmd/geth Autocompletion bugfix which let the console crash
2 parents e2d7c1a + f691213 commit 6fe46cc

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)