Commit 5b5e5b7d authored by Simon Marlow's avatar Simon Marlow

Fix #3534: No need to flush the byte buffer when setting binary mode

parent 970816ac
......@@ -551,7 +551,7 @@ hSetBinaryMode :: Handle -> Bool -> IO ()
hSetBinaryMode handle bin =
withAllHandles__ "hSetBinaryMode" handle $ \ h_@Handle__{..} ->
do
flushBuffer h_
flushCharBuffer h_
let mb_te | bin = Nothing
| otherwise = Just localeEncoding
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment