summaryrefslogtreecommitdiff
path: root/src/pkg/encoding/hex/hex.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/encoding/hex/hex.go')
-rw-r--r--src/pkg/encoding/hex/hex.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/encoding/hex/hex.go b/src/pkg/encoding/hex/hex.go
index 167d00e03..d1fc7024a 100644
--- a/src/pkg/encoding/hex/hex.go
+++ b/src/pkg/encoding/hex/hex.go
@@ -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] = ' '