mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 11:11:22 +00:00
Lua API: Fix an error in the terrain hex API
Attempting to access a non-string key was an error.
This commit is contained in:
parent
fd8d11d42b
commit
35fce3fa3b
@ -119,7 +119,7 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
||||
return self.x
|
||||
elseif key == 2 then
|
||||
return self.y
|
||||
elseif #key > 0 and key[0] ~= '_' then
|
||||
elseif type(key) ~= string or (#key > 0 and key[0] ~= '_') then
|
||||
return hex_mt[key]
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user