mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Wrappers now catch negative width or height in setScissor (bug #125)
This commit is contained in:
@@ -133,6 +133,9 @@ namespace opengl
|
|||||||
int w = luaL_checkint(L, 3);
|
int w = luaL_checkint(L, 3);
|
||||||
int h = luaL_checkint(L, 4);
|
int h = luaL_checkint(L, 4);
|
||||||
|
|
||||||
|
if (w < 0 || h < 0)
|
||||||
|
return luaL_error(L, "Can't set scissor with negative width and/or height.");
|
||||||
|
|
||||||
instance->setScissor(x, y, w, h);
|
instance->setScissor(x, y, w, h);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user