summaryrefslogtreecommitdiff
path: root/src/luaotfload-database.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-10-29 08:03:33 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-10-29 08:03:33 +0100
commitdfdee4a9f3e968c5493f9e4166503624edfe5eb0 (patch)
tree1989c99d67ca51f4cfeb3122fd748fdffa358c71 /src/luaotfload-database.lua
parent4ab63d7a670d90f9ffcbd2c35b363c432c043d5d (diff)
downloadluaotfload-dfdee4a9f3e968c5493f9e4166503624edfe5eb0.tar.gz
[db] fix passing inverse format list
Diffstat (limited to 'src/luaotfload-database.lua')
-rw-r--r--src/luaotfload-database.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index b871954..086f46f 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -1921,9 +1921,8 @@ end
local p_font_filter
do
- local current_formats = { }
-
local extension_pattern = function (list)
+ if type (list) ~= "table" or #list == 0 then return P(-1) end
local pat
for i=#list, 1, -1 do
local e = list[i]
@@ -1940,6 +1939,8 @@ do
--- small helper to adjust the font filter pattern (--formats
--- option)
+ local current_formats = { }
+
set_font_filter = function (formats)
if not formats or type (formats) ~= "string" then