CRASHFIX: people (from mobile?) could crash the server triggering fields.key_down from the formspec
parent
b025bef7b6
commit
a73602574f
|
@ -10,7 +10,8 @@ local S = minetest.get_translator("magic_compass")
|
|||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
|
||||
if formname ~= "magic_compass:GUI" then return end
|
||||
if fields.EMPTY or fields.quit then return end
|
||||
|
||||
if fields.EMPTY or fields.quit or fields.key_up or fields.key_down then return end
|
||||
|
||||
local ID = string.match(dump(fields), "%d+")
|
||||
local item = magic_compass.items[tonumber(ID)]
|
||||
|
|
Loading…
Reference in New Issue