Fix bug in wesnoth.map.read_location

This commit is contained in:
Celtic Minstrel 2021-04-26 01:38:09 -04:00
parent f282eb7948
commit 900c576fe8

View file

@ -7,6 +7,7 @@ end
function wesnoth.map.read_location(...)
local x, y = ...
if x == nil then return nil, 0 end
if y == nil or type(x) == 'table' or type(x) == 'userdata' then
if type(x.x) == 'number' and type(x.y) == 'number' then
x, y = x.x, x.y