summaryrefslogtreecommitdiff
path: root/RingBuffer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'RingBuffer.hs')
-rw-r--r--RingBuffer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/RingBuffer.hs b/RingBuffer.hs
index dd8a7f7..6ce36bc 100644
--- a/RingBuffer.hs
+++ b/RingBuffer.hs
@@ -45,8 +45,8 @@ ringMask r = do
45 mask cnt 45 mask cnt
46 | cnt==size = [(0,cnt)] 46 | cnt==size = [(0,cnt)]
47 | otherwise = case cnt + back - size of 47 | otherwise = case cnt + back - size of
48 front | front > cnt -> [(front - cnt,size)] 48 front | front >= cnt -> [(front - cnt,size)]
49 | otherwise -> [(0,back), (front,cnt - front)] 49 | otherwise -> [(0,back), (front,cnt - front)]
50 return mask 50 return mask
51 51
52syncRing :: RingBuffer u -> IO () 52syncRing :: RingBuffer u -> IO ()