Commits

Alex Szpakowski  committed 60194d6

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

  • Participants
  • Parent commits 6609872

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/wrap_Graphics.cpp

 	{
 		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: