From 77ba40f97e6176e5bdeccf632ea17cb3121a0333 Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 18 Sep 2025 15:30:12 +0300 Subject: Fixed fast_tilemap and texture_atlas_repeat examples. --- src/core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index cd9c9c0..338778e 100644 --- a/src/core.c +++ b/src/core.c @@ -2142,6 +2142,7 @@ Decompress data (DEFLATE algorithm). */ int lcoreDecompressData( lua_State* L ) { Buffer* inBuffer = uluaGetBuffer( L, 1 ); + Buffer outBuffer = { .size = 0, .type = inBuffer->type @@ -2166,10 +2167,10 @@ Encode data to Base64 string */ int lcoreEncodeDataBase64( lua_State* L ) { int dataSize = 0; - const char* string = luaL_checklstring( L, 1, (size_t*)&dataSize ); + const unsigned char* data = luaL_checklstring( L, 1, (size_t*)&dataSize ); int outputSize = 0; - char* compData = EncodeDataBase64( string, dataSize, &outputSize ); + char* compData = EncodeDataBase64( data, dataSize, &outputSize ); lua_pushstring( L, compData ); lua_pushinteger( L, outputSize ); @@ -2187,8 +2188,10 @@ Decode Base64 string data - Success return string, int */ int lcoreDecodeDataBase64( lua_State* L ) { + const unsigned char* data = luaL_checkstring( L, 1 ); + int outputSize = 0; - unsigned char* decodedData = DecodeDataBase64( luaL_checkstring( L, 1 ), &outputSize ); + unsigned char* decodedData = DecodeDataBase64( data, &outputSize ); lua_pushstring( L, decodedData ); lua_pushinteger( L, outputSize ); -- cgit v1.2.3