mirror of
https://github.com/golang/go
synced 2024-11-12 04:40:22 -07:00
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
This commit is contained in:
parent
2940dd4bf4
commit
01d49dc2dd
@ -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] = ' '
|
||||
|
Loading…
Reference in New Issue
Block a user