From ee8d6db3c1fc62af3eaeae77b263de41522ed888 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 29 Dec 2017 16:06:35 +0100 Subject: [PATCH] Correct end of line in basis file --- ocaml/Gto.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml/Gto.ml b/ocaml/Gto.ml index ab265202..a46be191 100644 --- a/ocaml/Gto.ml +++ b/ocaml/Gto.ml @@ -36,7 +36,10 @@ let of_prim_coef_list pc = let read_one in_channel = (* Fetch number of lines to read on first line *) - let buffer = input_line in_channel in + let buffer = + try input_line in_channel with + | End_of_file -> raise End_Of_Basis + in if ( (String_ext.strip buffer) = "" ) then raise End_Of_Basis; let sym_str = String.sub buffer 0 2 in