Prevent segfault if invalid args are given.

This commit is contained in:
Justin Ethier 2016-06-30 21:44:03 -04:00
parent 8a89678f6c
commit a6c3e4818a

View file

@ -365,9 +365,6 @@
(if (member "-d" args)
(set! compile? #f)) ;; Debug, do not run GCC
(cond
((< (length args) 1)
(display "cyclone: no input file")
(newline))
((or (member "-h" args)
(member "--help" args))
(display "
@ -387,6 +384,10 @@
(display *version-banner*))
((member "--autogen" args)
(autogen "autogen.out"))
((or (< (length args) 1)
(null? non-opts))
(display "cyclone: no input file")
(newline))
(else
(run-compiler non-opts compile?))))