Source

love-experiments / src / modules / graphics / opengl / wrap_Image.cpp

The branch 'vbostrategy' does not exist.
Diff from to

src/modules/graphics/opengl/wrap_Image.cpp

 	Image::FilterMode min;
 	Image::FilterMode mag;
 	const char *minstr = luaL_checkstring(L, 2);
-	const char *magstr = luaL_checkstring(L, 3);
+	const char *magstr = luaL_optstring(L, 3, minstr);
 	if (!Image::getConstant(minstr, min))
 		return luaL_error(L, "Invalid filter mode: %s", minstr);
 	if (!Image::getConstant(magstr, mag))
 	Image::WrapMode s;
 	Image::WrapMode t;
 	const char *sstr = luaL_checkstring(L, 2);
-	const char *tstr = luaL_checkstring(L, 3);
+	const char *tstr = luaL_optstring(L, 3, sstr);
 	if (!Image::getConstant(sstr, s))
 		return luaL_error(L, "Invalid wrap mode: %s", sstr);
 	if (!Image::getConstant(tstr, t))