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:
parent
d22609051a
commit
fe249cd1f8
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user