Improve the error message when a type other than a table is given as the 3rd arg to newCanvas.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-09-16 20:01:48 -03:00
parent 23929cab14
commit 8a77ea1007
+2
View File
@@ -1144,6 +1144,8 @@ int w_newCanvas(lua_State *L)
if (!lua_isnoneornil(L, startidx))
{
luaL_checktype(L, startidx, LUA_TTABLE);
settings.pixeldensity = (float) luax_numberflag(L, startidx, "pixeldensity", settings.pixeldensity);
settings.msaa = luax_intflag(L, startidx, "msaa", settings.msaa);