diff options
author | luk3yx <luk3yx@users.noreply.github.com> | 2020-10-26 06:01:39 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-25 18:01:39 +0100 |
commit | 61a196378ff91411af3245504c5861da026b3b25 (patch) | |
tree | 4c046a483d7a7d6e6b6982283cfeaeafccb9f4a0 /src/script/cpp_api | |
parent | 707c8c1e95d8db2d84909e7957b4dc9138e05599 (diff) | |
download | minetest-61a196378ff91411af3245504c5861da026b3b25.tar.gz minetest-61a196378ff91411af3245504c5861da026b3b25.tar.bz2 minetest-61a196378ff91411af3245504c5861da026b3b25.zip |
Fix CSMs on arm64 (#10553)
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r-- | src/script/cpp_api/s_security.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_security.cpp b/src/script/cpp_api/s_security.cpp index 2afa3a191..01333b941 100644 --- a/src/script/cpp_api/s_security.cpp +++ b/src/script/cpp_api/s_security.cpp @@ -629,7 +629,11 @@ int ScriptApiSecurity::sl_g_loadfile(lua_State *L) { #ifndef SERVER lua_rawgeti(L, LUA_REGISTRYINDEX, CUSTOM_RIDX_SCRIPTAPI); +#if INDIRECT_SCRIPTAPI_RIDX + ScriptApiBase *script = (ScriptApiBase *) *(void**)(lua_touserdata(L, -1)); +#else ScriptApiBase *script = (ScriptApiBase *) lua_touserdata(L, -1); +#endif lua_pop(L, 1); // Client implementation |