Skip to content

Commit

Permalink
fixed overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BebeSparkelSparkel committed May 23, 2024
1 parent 75246e8 commit e631f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/Text/IO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ writeBlocks isCRLF h buf0 (Stream next0 s0 _len) = outer s0 buf0
Done -> commit n False{-no flush-} True{-release-} >> return ()
Skip s' -> inner s' n
Yield x s'
| n >= bufSize + bool 1 0 (isCRLF && x == '\n') ->
| n >= bufSize - bool 0 1 (isCRLF && x == '\n') ->
commit n True{-needs flush-} False >>= outer s
| isCRLF && x == '\n' -> do
n1 <- writeCharBuf bufRaw bufSize n '\r'
Expand Down

0 comments on commit e631f71

Please sign in to comment.