Can happen
authormalc <av1474@comtv.ru>
Wed, 24 Oct 2012 22:24:25 +0000 (25 02:24 +0400)
committermalc <av1474@comtv.ru>
Wed, 24 Oct 2012 22:24:25 +0000 (25 02:24 +0400)
Whole circular buffer needs to be redone

main.ml

diff --git a/main.ml b/main.ml
index 66a3b0a..3c95e78 100644 (file)
--- a/main.ml
+++ b/main.ml
@@ -209,7 +209,7 @@ let cbgetg b circular dir =
         if rc = -1
         then b.len-1
         else (
-          if rc = b.len
+          if rc >= b.len
           then 0
           else rc
         )