love.graphics.isSupported now errors if an invalid string is given (see issue #690)

This commit is contained in:
Alex Szpakowski
2013-08-17 00:12:46 -03:00
parent 3fc0d0171a
commit 72068ba519
@@ -1051,10 +1051,8 @@ int w_isSupported(lua_State *L)
{
const char *str = luaL_checkstring(L, i);
if (!Graphics::getConstant(str, support))
{
supported = false;
break;
}
return luaL_error(L, "Invalid graphics feature: %s", str);
switch (support)
{
case Graphics::SUPPORT_CANVAS: