mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-03 11:16:34 +02:00
Prevent segfault if invalid args are given.
This commit is contained in:
parent
8a89678f6c
commit
a6c3e4818a
1 changed files with 4 additions and 3 deletions
|
@ -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?))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue