Skip to content

Commit

Permalink
Check result of Write
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Sep 20, 2021
1 parent 2e1b0c1 commit a2827f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion noncolorable.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ loop:
}
if c1 != 0x1b {
bw[0] = c1
w.out.Write(bw[:])
_, err = w.out.Write(bw[:])
if err != nil {
break loop
}
continue
}
c2, err := er.ReadByte()
Expand Down

0 comments on commit a2827f0

Please sign in to comment.