diff options
-rw-r--r-- | cmd/geth/js.go | 2 | ||||
-rw-r--r-- | rpc/comms/http.go | 4 |
2 files changed, 3 insertions, 3 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, "" } diff --git a/rpc/comms/http.go b/rpc/comms/http.go index c165aa27e..f4a930d0e 100644 --- a/rpc/comms/http.go +++ b/rpc/comms/http.go @@ -271,13 +271,13 @@ func (self *httpClient) Send(req interface{}) error { reply, _ := ioutil.ReadAll(resp.Body) var rpcSuccessResponse shared.SuccessResponse if err = self.codec.Decode(reply, &rpcSuccessResponse); err == nil { - self.lastRes = rpcSuccessResponse.Result + self.lastRes = &rpcSuccessResponse self.lastErr = err return nil } else { var rpcErrorResponse shared.ErrorResponse if err = self.codec.Decode(reply, &rpcErrorResponse); err == nil { - self.lastRes = rpcErrorResponse.Error + self.lastRes = &rpcErrorResponse self.lastErr = err return nil } else { |