diff options
| author | Alasdair Armstrong | 2017-10-26 18:43:18 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-10-26 18:43:18 +0100 |
| commit | f5923a281af7e826d03d59d8281e457d0c4c87fe (patch) | |
| tree | fc577cc9c8c46b4243c6c3a3e16fd026368f5b3c /lib/ocaml_rts | |
| parent | 1d38bcff2ce300f880d2ab045678bb07b2fc67a8 (diff) | |
Fix a bug in Sail OCaml library
Diffstat (limited to 'lib/ocaml_rts')
| -rw-r--r-- | lib/ocaml_rts/sail_lib.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ocaml_rts/sail_lib.ml b/lib/ocaml_rts/sail_lib.ml index a0ba31eb..7639a127 100644 --- a/lib/ocaml_rts/sail_lib.ml +++ b/lib/ocaml_rts/sail_lib.ml @@ -380,7 +380,9 @@ let eq_string (str1, str2) = String.compare str1 str2 == 0 let lt_int (x, y) = lt_big_int x y let set_slice (out_len, slice_len, out, n, slice) = - update_subrange(out, n, sub_big_int n (big_int_of_int (List.length slice - 1)), slice) + let out = update_subrange(out, add_big_int n (big_int_of_int (List.length slice - 1)), n, slice) in + assert (List.length out = int_of_big_int out_len); + out let set_slice_int (_, _, _, _) = assert false |
