From 22f70cf06f75cd5022e622a9d14a56b67e74a157 Mon Sep 17 00:00:00 2001 From: jussi Date: Fri, 7 Apr 2023 18:47:48 +0300 Subject: textures and core new argument style. --- src/lua_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lua_core.c') diff --git a/src/lua_core.c b/src/lua_core.c index b339be2..ea0851b 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -2059,7 +2059,11 @@ void uluaPushBoundingBox( lua_State *L, BoundingBox box ) { } int uluaGetTableLen( lua_State *L ) { - int t = lua_gettop( L ), i = 0; + return uluaGetTableLenIndex( L, lua_gettop( L ) ); +} + +int uluaGetTableLenIndex( lua_State *L, int index ) { + int t = index, i = 0; lua_pushnil( L ); while ( lua_next( L, t ) != 0 ) { -- cgit v1.2.3