Skip to content

Commit

Permalink
fix: Make --profiling not crash (#947)
Browse files Browse the repository at this point in the history
As noted in #935 the
--profiling option currently makes Alt-Ergo instantly crash because in
#863 we forgot a slot for the
last element in the array. This patch fixes that.
  • Loading branch information
bclement-ocp authored Nov 17, 2023
1 parent e96d3d4 commit ecfa4b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/util/timers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ end = struct

let create () =
Array.init
max_ty_module
(fun _ -> Array.init max_ty_function (fun _ -> 0.))
(max_ty_module + 1)
(fun _ -> Array.init (max_ty_function + 1) (fun _ -> 0.))

let clear =
Array.iter (fun a -> Array.iteri (fun j _ -> a.(j) <- 0.) a)
Expand Down

0 comments on commit ecfa4b7

Please sign in to comment.