summaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorjussi2023-07-02 17:44:24 +0300
committerjussi2023-07-02 17:44:24 +0300
commit8ad725429292be22086d51df285907742be7a91a (patch)
tree41c13c146bb3f3f82ade36c2518d105a72b2a5dc /src/core.c
parent0e77452a1b4f894e342dae5583f8b02f915e8f6d (diff)
downloadreilua-enhanced-8ad725429292be22086d51df285907742be7a91a.tar.gz
reilua-enhanced-8ad725429292be22086d51df285907742be7a91a.tar.bz2
reilua-enhanced-8ad725429292be22086d51df285907742be7a91a.zip
LuaJIT compatibility.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 6c8e7a1..ab65626 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1006,13 +1006,13 @@ int lcoreLoadShaderFromMemory( lua_State *L ) {
char *fs = NULL;
if ( lua_isstring( L, 1 ) ) {
- size_t vsLen = lua_rawlen( L, 1 ) + 1;
+ size_t vsLen = uluaGetTableLenIndex( L, 1 ) + 1;
vs = malloc( vsLen * sizeof( char ) );
strcpy( vs, lua_tostring( L, 1 ) );
}
if ( lua_isstring( L, 2 ) ) {
- size_t fsLen = lua_rawlen( L, 2 ) + 1;
+ size_t fsLen = uluaGetTableLenIndex( L, 2 ) + 1;
fs = malloc( fsLen * sizeof( char ) );
strcpy( fs, lua_tostring( L, 2 ) );