From e3fdf84f5c64fc5641d01e8ea5cc903a54ed6652 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Wed, 13 Apr 2022 20:19:28 -0400 Subject: [PATCH] fix!: make path to script the 0th arg instead of 1st makes more sense, brings some lua parity this means that user passed args start from 1 instead of 2 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7106305..d4bcc30 100644 --- a/main.go +++ b/main.go @@ -155,7 +155,7 @@ func main() { if getopt.NArgs() > 0 { luaArgs := rt.NewTable() for i, arg := range getopt.Args() { - luaArgs.Set(rt.IntValue(int64(i + 1)), rt.StringValue(arg)) + luaArgs.Set(rt.IntValue(int64(i)), rt.StringValue(arg)) } l.GlobalEnv().Set(rt.StringValue("args"), rt.TableValue(luaArgs))