[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in cpcall
- From: "Alexander Gladysh" <agladysh@...>
- Date: Tue, 11 Mar 2008 12:39:04 +0300
Hi!
for (j = 1; j<1000;j++)
status = lua_cpcall(LL, do_stuff, NULL); /* does not panic */
switch(status)
{
/* ...*/
}
I believe you meant either
for (j = 1; j<1000;j++)
{
status = lua_cpcall(LL, do_stuff, NULL); /* does not panic */
switch(status)
{
/* ...*/
}
}
Or
for (j = 1; j<1000;j++)
{
status = lua_cpcall(LL, do_stuff, NULL); /* does not panic */
if (status != 0)
break;
}
switch(status)
{
/* ...*/
}
Before segfault your code fails a number of times with LUA_ERRMEM.
HTH,
Alexander.