summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-11-03 16:53:14 +0000
committerAlasdair Armstrong2017-11-03 16:53:14 +0000
commite78052dc43c7c0726c4f3069b5bb95d7bccdad23 (patch)
tree214c8c62710e161edaf1dd8c0102f93cad2a631b /src
parentce3cd80585a943479614e2112b51a631c3e1376b (diff)
Fix a bug where sail would throw an exception with empty file list
Diffstat (limited to 'src')
-rw-r--r--src/sail.ml3
1 files changed, 2 insertions, 1 deletions
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