10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-06-13 16:55:17 +02:00

Fix running averages

This commit is contained in:
Anthony Scemama 2022-01-12 14:43:29 +01:00
parent bb64e47ac9
commit 70dbec8ab8

View File

@ -110,7 +110,9 @@ let read_bytes b idx =
Bytes.get_int64_ne b idx
|> Int64.to_int
in
Some (Bytes.sub b (idx+8) m, idx+8+m)
try
Some (Bytes.sub b (idx+8) m, idx+8+m)
with Invalid_argument _ -> None