Fix incorrect error message when encountering an unknown persistent tag

This commit is contained in:
Celtic Minstrel 2018-04-01 14:01:50 -04:00 committed by GitHub
parent 6b20ccdb62
commit 2492585ee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -409,7 +409,8 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
local warned_tags = {}
for i = 1, #cfg do
local name = cfg[i][1]
local tag = wesnoth.persistent_tags[name]
-- Use rawget so as not to trigger the auto-adding mechanism
local tag = rawget(wesnoth.persistent_tags, name)
if type(tag) == 'table' and type(tag.read) == 'function' then
tag.read(cfg[i][2])
elseif tag ~= nil and not warned_tags[name] then