Commits

Bryan O'Sullivan committed 71d0a45

Halve the amount of copying we do (the unnecessary half).

Comments (0)

Files changed (1)

Data/Text/Encoding/Fusion.hs

           dest <- mallocByteString destLen
           withForeignPtr src  $ \src'  ->
               withForeignPtr dest $ \dest' ->
-                  memcpy dest' src' (fromIntegral destLen)
+                  memcpy dest' src' (fromIntegral srcLen)
           return dest
 
 encodingError :: String -> a