do not allow users to create an empty font group (#1303)
This commit is contained in:
parent
2638e9636b
commit
b7e9ca6585
|
@ -145,6 +145,8 @@ static int f_font_group(lua_State* L) {
|
|||
luaL_checktype(L, 1, LUA_TTABLE);
|
||||
|
||||
table_size = lua_rawlen(L, 1);
|
||||
if (table_size <= 0)
|
||||
return luaL_error(L, "failed to create font group: table is empty");
|
||||
if (table_size > FONT_FALLBACK_MAX)
|
||||
return luaL_error(L, "failed to create font group: table size too large");
|
||||
|
||||
|
|
Loading…
Reference in New Issue