pref: fix crash in 'v run' without arguments

pull/5024/head
pancake 2020-05-25 12:30:12 +02:00 committed by GitHub
parent d22609051a
commit fe249cd1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ pub fn parse_args(args []string) (&Preferences, string) {
res.path = command res.path = command
} else if command == 'run' { } else if command == 'run' {
res.is_run = true res.is_run = true
if command_pos > args.len { if command_pos + 2 > args.len {
eprintln('v run: no v files listed') eprintln('v run: no v files listed')
exit(1) exit(1)
} }