[Lua] Avoid variable reuse as a different type

This commit is contained in:
Celtic Minstrel 2024-02-04 14:44:27 -05:00
parent 310c43a4c4
commit a5537dba4f

View file

@ -3,8 +3,8 @@ local function path_locs(path)
if path.location_id then
local function special_locations()
return function()
for _,loc in ipairs(tostring(path.location_id):split()) do
loc = wesnoth.current.map.special_locations[loc]
for _,loc_id in ipairs(tostring(path.location_id):split()) do
local loc = wesnoth.current.map.special_locations[loc_id]
if loc then coroutine.yield(loc.x, loc.y) end
end
end