mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Prevent overflows and underflows in love.graphics.push and love.graphics.pop (bug #118)
Maximum is hardware maximum - 5, so the engine itself has a few matrices.
This commit is contained in:
@@ -950,15 +950,29 @@ namespace opengl
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w_push(lua_State *)
|
||||
int w_push(lua_State *L)
|
||||
{
|
||||
instance->push();
|
||||
try
|
||||
{
|
||||
instance->push();
|
||||
}
|
||||
catch (love::Exception e)
|
||||
{
|
||||
return luaL_error(L, e.what());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w_pop(lua_State *)
|
||||
int w_pop(lua_State *L)
|
||||
{
|
||||
instance->pop();
|
||||
try
|
||||
{
|
||||
instance->pop();
|
||||
}
|
||||
catch (love::Exception e)
|
||||
{
|
||||
return luaL_error(L, e.what());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user