mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 23:25:59 +00:00
Fix a variable referenced out of its scope (bug #19803)
This commit is contained in:
parent
b207a1b1ca
commit
6f48761f93
@ -204,6 +204,7 @@ function wml_actions.objectives(cfg)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function wml_actions.show_objectives(cfg)
|
function wml_actions.show_objectives(cfg)
|
||||||
|
local cfg0 = scenario_objectives[0]
|
||||||
local function local_show_objectives(sides)
|
local function local_show_objectives(sides)
|
||||||
local objectives0 = cfg0 and generate_objectives(cfg0)
|
local objectives0 = cfg0 and generate_objectives(cfg0)
|
||||||
for i, team in ipairs(sides) do
|
for i, team in ipairs(sides) do
|
||||||
@ -214,7 +215,6 @@ function wml_actions.show_objectives(cfg)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local sides = wesnoth.get_sides(cfg)
|
local sides = wesnoth.get_sides(cfg)
|
||||||
local cfg0 = scenario_objectives[0]
|
|
||||||
if #sides == 0 then
|
if #sides == 0 then
|
||||||
local_show_objectives(wesnoth.sides)
|
local_show_objectives(wesnoth.sides)
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user