lua option '--' may not be followed by script
This commit is contained in:
3
lua.c
3
lua.c
@@ -303,7 +303,8 @@ static int collectargs (char **argv, int *first) {
|
||||
case '-': /* '--' */
|
||||
if (argv[i][2] != '\0') /* extra characters after '--'? */
|
||||
return has_error; /* invalid option */
|
||||
*first = i + 1;
|
||||
/* if there is a script name, it comes after '--' */
|
||||
*first = (argv[i + 1] != NULL) ? i + 1 : 0;
|
||||
return args;
|
||||
case '\0': /* '-' */
|
||||
return args; /* script "name" is '-' */
|
||||
|
||||
Reference in New Issue
Block a user