mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 19:02:00 +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
|
||||
|
||||
function wml_actions.show_objectives(cfg)
|
||||
local cfg0 = scenario_objectives[0]
|
||||
local function local_show_objectives(sides)
|
||||
local objectives0 = cfg0 and generate_objectives(cfg0)
|
||||
for i, team in ipairs(sides) do
|
||||
@ -214,7 +215,6 @@ function wml_actions.show_objectives(cfg)
|
||||
end
|
||||
end
|
||||
local sides = wesnoth.get_sides(cfg)
|
||||
local cfg0 = scenario_objectives[0]
|
||||
if #sides == 0 then
|
||||
local_show_objectives(wesnoth.sides)
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user