1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

pref: fix crash in 'v run' without arguments

This commit is contained in:
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

View File

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