aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ltablib.c b/ltablib.c
index c8838963..2ba31a4f 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -59,8 +59,10 @@ static void checktab (lua_State *L, int arg, int what) {
59 59
60 60
61static int tcreate (lua_State *L) { 61static int tcreate (lua_State *L) {
62 int sizeseq = (int)luaL_checkinteger(L, 1); 62 lua_Unsigned sizeseq = (lua_Unsigned)luaL_checkinteger(L, 1);
63 int sizerest = (int)luaL_optinteger(L, 2, 0); 63 lua_Unsigned sizerest = (lua_Unsigned)luaL_optinteger(L, 2, 0);
64 luaL_argcheck(L, sizeseq <= UINT_MAX, 1, "out of range");
65 luaL_argcheck(L, sizerest <= UINT_MAX, 2, "out of range");
64 lua_createtable(L, sizeseq, sizerest); 66 lua_createtable(L, sizeseq, sizerest);
65 return 1; 67 return 1;
66} 68}