[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua stack problem.
- From: Ross Andrews <ross.andrews@...>
- Date: Mon, 13 Jun 2011 14:02:42 -0500
Seems fairly straightforward: you're pushing more things on to the stack than it has room for. If you call lua_checkstack first, it will enlarge the stack to make the room.
On Mon, Jun 13, 2011 at 1:53 PM, Gabriel Lassonde <email@example.com>
This question was probably answered before but I ran into a problem
trying to push many lua values from a c function.
This is a small application that shows the problem.
lua_State * state = luaL_newstate();
for(size_t i = 0; i < 50; ++i)
//lua_checkstack(state, 1); // Uncommenting this "fixes" the problem.
Upon "lua_close" the program crash (Heap corruption).
I am compiling under windows.
Can anyone help me understand what the problem is?