From e78052dc43c7c0726c4f3069b5bb95d7bccdad23 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 3 Nov 2017 16:53:14 +0000 Subject: Fix a bug where sail would throw an exception with empty file list --- src/sail.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sail.ml b/src/sail.ml index 8a70cb70..2714b6a4 100644 --- a/src/sail.ml +++ b/src/sail.ml @@ -146,7 +146,7 @@ let _ = let main() = - if !(opt_print_version) + if !opt_print_version then Printf.printf "Sail private release \n" else if !opt_memo_z3 then Constraint.load_digests () else (); @@ -175,6 +175,7 @@ let main() = else rewrite_ast ast in let out_name = match !opt_file_out with + | None when parsed = [] -> "out.sail" | None -> fst (List.hd parsed) | Some f -> f ^ ".sail" in -- cgit v1.2.3