diff options
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-x | luaotfload-tool.lua | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 17d9399..3bae175 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -892,9 +892,17 @@ local get_fields get_fields = function (entry, fields, acc, n) local tmp = entry for i = 1, #chain - 1 do tmp = tmp [chain [i]] + if not tmp then + --- invalid field + break + end + end + if tmp then + local value = tmp [chain [#chain]] + acc[#acc+1] = value or false + else + acc[#acc+1] = false end - local value = tmp [chain [#chain]] - acc[#acc+1] = value or false return get_fields (entry, fields, acc, n+1) end return acc @@ -997,8 +1005,11 @@ actions.list = function (job) local chain = stringsplit (criterion, "->") for i = 1, #chain - 1 do tmp = tmp [chain [i]] + if not tmp then + break + end end - local value = tmp [chain [#chain]] + local value = tmp and tmp [chain [#chain]] or "<none>" if value then --value = tostring(value) local entries = by_category[value] |