From 7af7e7003131e182efb30bac8c1ff06ac1d667d6 Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 15 Oct 2023 18:54:19 +0300 Subject: Renamed start, end arguments to a, b to avoid using Lua keyword end in argument names. --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/models.c') diff --git a/src/models.c b/src/models.c index 380d8cf..89ea810 100644 --- a/src/models.c +++ b/src/models.c @@ -1661,7 +1661,7 @@ int lmodelsCreateMaterial( lua_State *L ) { lua_pushnil( L ); while ( lua_next( L, t4 ) != 0 ) { - if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && lua_isnumber( L, -1 ) ) { + if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && isValidTexture( L, lua_gettop( L ), true ) ) { state->materials[i]->maps[map].texture = uluaGetTexture( L, lua_gettop( L ) ); } else if ( strcmp( "color", (char*)lua_tostring( L, -2 ) ) == 0 && lua_istable( L, -1 ) ) { -- cgit v1.2.3