Parameters for 'lua_createtable' back to int

Tables don't accept sizes larger than int.
This commit is contained in:
Roberto Ierusalimschy
2025-01-21 13:33:59 -03:00
parent 724012d3d0
commit 7d7ae8781e
7 changed files with 18 additions and 16 deletions

2
lua.c
View File

@@ -185,7 +185,7 @@ static void print_version (void) {
static void createargtable (lua_State *L, char **argv, int argc, int script) {
int i, narg;
narg = argc - (script + 1); /* number of positive indices */
lua_createtable(L, cast_uint(narg), cast_uint(script + 1));
lua_createtable(L, narg, script + 1);
for (i = 0; i < argc; i++) {
lua_pushstring(L, argv[i]);
lua_rawseti(L, -2, i - script);