[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Dangerous to call luaL_checkstack when the stack is saturated?
- From: DeathByNukes <deathbynukes@...>
- Date: Fri, 4 Dec 2015 01:58:50 -0600
Looking at the implementation of luaL_checkstack, it merely calls lua_checkstack and immediately calls luaL_error if that returns false. luaL_error internally pushes 2 values on the stack without checking.
Shouldn't there be a call to lua_checkstack(L,2) somewhere in there so it can conditionally pop 2 values from the stack before proceeding?