Commit 01d49dc2 authored by Rui Ueyama's avatar Rui Ueyama Committed by Brad Fitzpatrick

encoding/hex: add error check for write error.

I believe the original author of this code just forgot to check for error here.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/76760043
parent 2940dd4b
......@@ -146,6 +146,9 @@ func (h *dumper) Write(data []byte) (n int, err error) {
h.buf[12] = ' '
h.buf[13] = ' '
_, err = h.w.Write(h.buf[4:])
if err != nil {
return
}
}
Encode(h.buf[:], data[i:i+1])
h.buf[2] = ' '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment