Skip to content
Browse files

[fix] buffer,pool: segfault+assert false

  • Loading branch information...
1 parent 888e3bd commit 523f49ae29d6379cd9626a84ac9817ba3e1f4e86 @OpaOnWindowsNow OpaOnWindowsNow committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 ocamllib/libbase/pool.ml
View
4 ocamllib/libbase/pool.ml
@@ -69,13 +69,13 @@ module Pool = functor (Egg:Egg.Egg) -> struct
let shallow_copy (egg:'a) =
let eggt = Obj.repr egg in
- assert(Obj.double_array_tag = Obj.tag eggt);
+ assert(Obj.double_array_tag <> Obj.tag eggt);
(Obj.obj (Obj.dup (Obj.repr egg)):'a)
let shallow_transfer ~from ~to_ =
let from = Obj.repr from in
let to_ = Obj.repr to_ in
- for i = 0 to min (Obj.size from) (Obj.size to_) do
+ for i = 0 to (min (Obj.size from) (Obj.size to_)) - 1 do
Obj.set_field to_ i (Obj.field from i)
done

0 comments on commit 523f49a

Please sign in to comment.
Something went wrong with that request. Please try again.