From d287078c658d26d41a28f92b62b023048c5503ce Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 30 Oct 2023 00:04:11 +0200 Subject: Userdata objects can be referenced with lightuserdata. --- src/shapes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shapes.c') diff --git a/src/shapes.c b/src/shapes.c index ed2af7a..975b478 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -16,7 +16,7 @@ NOTE: It can be useful when using basic shapes and one single font, defining a font char white rectangle would allow drawing everything in a single draw call */ int lshapesSetShapesTexture( lua_State *L ) { - Texture *texture = luaL_checkudata( L, 1, "Texture" ); + Texture *texture = uluaGetTexture( L, 1 ); Rectangle source = uluaGetRectangleIndex( L, 2 ); SetShapesTexture( *texture, source ); -- cgit v1.2.3