From 4c955e7461b76b66660ffd2a1d14b4a48a7a3e38 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Mon, 21 Dec 2015 20:33:16 +0100 Subject: [PATCH] don't use __shallow_literal directly the passed config might not be a vconfig. --- data/lua/wml-tags.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index a91bd24249d..c2497b79304 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -933,7 +933,7 @@ end function wml_actions.harm_unit(cfg) local filter = helper.get_child(cfg, "filter") or helper.wml_error("[harm_unit] missing required [filter] tag") -- we need to use shallow_literal field, to avoid raising an error if $this_unit (not yet assigned) is used - if not cfg.__shallow_literal.amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end + if not helper.shallow_literal(cfg).amount then helper.wml_error("[harm_unit] has missing required amount= attribute") end local variable = cfg.variable -- kept out of the way to avoid problems local _ = wesnoth.textdomain "wesnoth" -- #textdomain wesnoth