Explorar el Código

Make sure registering global values does not polute the execution stack

Ole hace 10 años
padre
commit
bfe60d7a62
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/luwra/stack.hpp

+ 1 - 1
lib/luwra/stack.hpp

@@ -138,7 +138,7 @@ bool equal(State* state, int index1, int index2) {
  */
 template <typename T> static inline
 void register_global(State* state, const char* name, T value) {
-	push(state, value);
+	assert(1 == push(state, value));
 	lua_setglobal(state, name);
 }