aboutsummaryrefslogtreecommitdiff
path: root/src/lua/common/je_lua_reference.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-25 00:11:28 +0800
committerchai <chaifix@163.com>2018-11-25 00:11:28 +0800
commite8e12b11db220160eb63727fb03548410bf3afd2 (patch)
treea36d62b783e97af9047469955b1aa0ddae6b4627 /src/lua/common/je_lua_reference.cpp
parent42421575d2e17b5c57ff0034c037b651bd6d1119 (diff)
*misc
Diffstat (limited to 'src/lua/common/je_lua_reference.cpp')
-rw-r--r--src/lua/common/je_lua_reference.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/common/je_lua_reference.cpp b/src/lua/common/je_lua_reference.cpp
index 37ed441..72c1c3e 100644
--- a/src/lua/common/je_lua_reference.cpp
+++ b/src/lua/common/je_lua_reference.cpp
@@ -10,7 +10,9 @@ namespace JinEngine
LuaRef::LuaRef(lua_State* L, int i)
: mL(L)
{
+ // Get value.
luax_pushvalue(mL, i);
+ // Set reference.
luax_getreferencestable(L);
luax_pushvalue(mL, -2);
mIndex = luax_ref(mL, -2);