Explorar o código

Make sure the globals reference is never removed

Ole %!s(int64=9) %!d(string=hai) anos
pai
achega
48a598611d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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