aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua.c b/lua.c
index 4a90e55d..8055b70f 100644
--- a/lua.c
+++ b/lua.c
@@ -302,7 +302,8 @@ static int collectargs (char **argv, int *first) {
302 case '-': /* '--' */ 302 case '-': /* '--' */
303 if (argv[i][2] != '\0') /* extra characters after '--'? */ 303 if (argv[i][2] != '\0') /* extra characters after '--'? */
304 return has_error; /* invalid option */ 304 return has_error; /* invalid option */
305 *first = i + 1; 305 /* if there is a script name, it comes after '--' */
306 *first = (argv[i + 1] != NULL) ? i + 1 : 0;
306 return args; 307 return args;
307 case '\0': /* '-' */ 308 case '\0': /* '-' */
308 return args; /* script "name" is '-' */ 309 return args; /* script "name" is '-' */