Skip to content

Commit a2827f0

Browse files
committed
Check result of Write
1 parent 2e1b0c1 commit a2827f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

noncolorable.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ loop:
2727
}
2828
if c1 != 0x1b {
2929
bw[0] = c1
30-
w.out.Write(bw[:])
30+
_, err = w.out.Write(bw[:])
31+
if err != nil {
32+
break loop
33+
}
3134
continue
3235
}
3336
c2, err := er.ReadByte()

0 commit comments

Comments
 (0)