diff options
| author | jussi | 2025-09-18 15:30:12 +0300 |
|---|---|---|
| committer | jussi | 2025-09-18 15:30:12 +0300 |
| commit | 77ba40f97e6176e5bdeccf632ea17cb3121a0333 (patch) | |
| tree | 149d054950d8d7b8612a76c5e6090a99b13c485b /src/core.c | |
| parent | 3f27d9037d860dd0c9f1a06d76a60fd0e2142de9 (diff) | |
| download | reilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.tar.gz reilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.tar.bz2 reilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.zip | |
Fixed fast_tilemap and texture_atlas_repeat examples.
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 ); |
