Fix #3534: No need to flush the byte buffer when setting binary mode
[ghc-base.git] / GHC / IO / Handle.hs
index b3c780e..a8af17c 100644 (file)
@@ -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