pref: do not allow -o .v

pull/5188/head
Alexander Medvednikov 2020-06-03 09:03:43 +02:00
parent ac0fee8e64
commit 99c70cf9c6
1 changed files with 4 additions and 0 deletions

View File

@ -244,6 +244,10 @@ pub fn parse_args(args []string) (&Preferences, string) {
} }
'-o' { '-o' {
res.out_name = cmdline.option(current_args, '-o', '') res.out_name = cmdline.option(current_args, '-o', '')
if res.out_name.ends_with('.v') {
eprintln('Cannot save output binary in a .v file.')
exit(1)
}
i++ i++
} }
'-b' { '-b' {