ソースを参照

Make sure the globals reference is never removed

Ole 9 年 前
コミット
48a598611d
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      lib/luwra/tables.hpp

+ 1 - 1
lib/luwra/tables.hpp

@@ -153,7 +153,7 @@ struct Value<Table> {
 static inline
 Table getGlobalsTable(State* state) {
 #if LUA_VERSION_NUM <= 501
-	return {state, LUA_GLOBALSINDEX};
+	return {{state, internal::referenceValue(state, LUA_GLOBALSINDEX), false}};
 #else
 	return {{state, LUA_RIDX_GLOBALS, false}};
 #endif