From 814aaadab5e3e3b181fc6feac566f4c4ee5a7e4a Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 30 Mar 2015 22:42:06 +0200 Subject: [PATCH] fix in Puf.iter --- src/misc/puf.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/misc/puf.ml b/src/misc/puf.ml index ef4ca0c8..919f2bcf 100644 --- a/src/misc/puf.ml +++ b/src/misc/puf.ml @@ -454,10 +454,11 @@ module Make(X : ID) : S with type elt = X.t = struct let iter uf f = PArray.iteri - (fun i e -> match e with + (fun i i' -> + if i = i' then match PArray.get uf.data i with | None -> () - | Some d -> if d.next = i then f d.elt - ) uf.data + | Some d -> f d.elt + ) uf.parent let inconsistent uf = uf.inconsistent