summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-configuration.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index aa91b27..fed003e 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -357,7 +357,8 @@ local process_options = function (opts)
return new
end
-local apply = function (old, new)
+local apply
+apply = function (old, new)
if not new then
if not old then
return false
@@ -367,8 +368,19 @@ local apply = function (old, new)
return tablecopy (new)
end
local result = tablecopy (old)
- for var, val in next, new do
- result[var] = val
+ for name, section in next, new do
+ local t_section = type (section)
+ if t_section ~= table_t then
+ logreport ("both", 1, "conf",
+ "Error applying configuration: entry %s is %s, expected table.",
+ section, t_section)
+ --- ignore
+ else
+ local currentsection = result[name]
+ for var, val in next, section do
+ currentsection[var] = val
+ end
+ end
end
return result
end