From: sof Date: Wed, 16 Apr 2003 15:12:02 +0000 (+0000) Subject: [project @ 2003-04-16 15:12:02 by sof] X-Git-Tag: nhc98-1-18-release~688 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=cc01140ea731e061e7f6df3982b4adda8d06a013;p=haskell-directory.git [project @ 2003-04-16 15:12:02 by sof] hGetArray: wrong result length returned. Merge to STABLE (if that's still on.) --- diff --git a/Data/Array/IO.hs b/Data/Array/IO.hs index 5644e58..34e9584 100644 --- a/Data/Array/IO.hs +++ b/Data/Array/IO.hs @@ -164,7 +164,7 @@ hGetArray handle (IOUArray (STUArray l u ptr)) count let remaining = count - copied if remaining > 0 then do rest <- readChunk fd is_stream ptr copied remaining - return (rest + count) + return (rest + copied) else return count readChunk :: FD -> Bool -> RawBuffer -> Int -> Int -> IO Int