diff options
| -rw-r--r-- | lua.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.129 2004/07/01 14:26:28 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.130 2004/07/13 19:56:44 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -107,9 +107,8 @@ static int getargs (lua_State *L, char *argv[], int n) { | |||
| 107 | narg = i-(n+1); /* number of arguments to the script (not to `lua.c') */ | 107 | narg = i-(n+1); /* number of arguments to the script (not to `lua.c') */ |
| 108 | lua_newtable(L); | 108 | lua_newtable(L); |
| 109 | for (i=0; argv[i]; i++) { | 109 | for (i=0; argv[i]; i++) { |
| 110 | lua_pushnumber(L, i - n); | ||
| 111 | lua_pushstring(L, argv[i]); | 110 | lua_pushstring(L, argv[i]); |
| 112 | lua_rawset(L, -3); | 111 | lua_rawseti(L, -2, i - n); |
| 113 | } | 112 | } |
| 114 | return narg; | 113 | return narg; |
| 115 | } | 114 | } |
