Commits

Alex Szpakowski committed db4e384

Really fixed setScissor erroring when scissoring is disabled and x,y,w,h from getScissor is used (see issue #709)

Comments (0)

Files changed (1)

src/modules/graphics/opengl/wrap_Graphics.cpp

 
 int w_setScissor(lua_State *L)
 {
-	if (lua_gettop(L) <= 1 && lua_isnoneornil(L, 1))
+	int nargs = lua_gettop(L);
+
+	if (nargs == 0 || (nargs == 4 && lua_isnil(L, 1) && lua_isnil(L, 2)
+		&& lua_isnil(L, 3) && lua_isnil(L, 4)))
 	{
 		instance->setScissor();
 		return 0;