[project @ 2003-04-16 15:12:02 by sof]
authorsof <unknown>
Wed, 16 Apr 2003 15:12:02 +0000 (15:12 +0000)
committersof <unknown>
Wed, 16 Apr 2003 15:12:02 +0000 (15:12 +0000)
hGetArray: wrong result length returned.

Merge to STABLE (if that's still on.)

Data/Array/IO.hs

index 5644e58..34e9584 100644 (file)
@@ -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