This seems to fix a bug occurring when using of_wml_var.

Should be proofread by someone who knows what they're doing.
This commit is contained in:
Lari Nieminen 2010-10-26 14:42:22 +00:00
parent 99cd3470c0
commit 3bd47bcb15

View File

@ -103,9 +103,9 @@ function methods:of_pairs(t)
end
function methods:of_wml_var(name)
local values = s.values
local values = self.values
for i = 0, wesnoth.get_variable(name .. ".length") - 1 do
local t = wesnoth.get_variable(string.format("%s[%d]", var, i))
local t = wesnoth.get_variable(string.format("%s[%d]", name, i))
local x, y = t.x, t.y
t.x, t.y = nil, nil
values[index(x, y)] = next(t) and t or true