Skip to content

Commit

Permalink
Fix incorrect error message when encountering an unknown persistent tag
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 1, 2018
1 parent 6b20ccd commit 2492585
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/lua/core.lua
Expand Up @@ -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
Expand Down

0 comments on commit 2492585

Please sign in to comment.