diff --git a/data/lua/location_set.lua b/data/lua/location_set.lua index 629f7ebc79d..0e938a34810 100644 --- a/data/lua/location_set.lua +++ b/data/lua/location_set.lua @@ -198,7 +198,7 @@ function methods:random() -- Return -1, -1 if empty local r = wesnoth.random(self:size()) local i, xr, yr = 1, -1, -1 - map:iter( function(x, y, v) + self:iter( function(x, y, v) if (i == r) then xr, yr = x, y end i = i + 1 end)