Commits

Bryan O'Sullivan committed e15e584

Another buffer management bugger-up

Comments (0)

Files changed (1)

src/Network/Riak/Connection/Internal.hs

     maxInt = fromIntegral (maxBound :: Int)
     go (s:acc) n
       | n < 0 = do
-        let (h,t) = B.splitAt (B.length s - fromIntegral n) s
+        let (h,t) = B.splitAt (B.length s + fromIntegral n) s
         writeIORef connBuffer $! L.fromChunks [t]
         return $ L.fromChunks (reverse (h:acc))
     go acc n