mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-28 10:13:50 +01:00
fix bug in size setting sanitizing
This commit is contained in:
parent
a7e89e6c2e
commit
bc4e940c80
@ -135,7 +135,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
-- Set size (scaling) of the timer HUD element
|
||||
if formname == 'mtimer:hud_element_size' then
|
||||
local attr = m.meta.hud_element_size
|
||||
local value = tonumber(fields.hud_element_size or attr.default)
|
||||
local default = tonumber(attr.default)
|
||||
local value = tonumber(fields.hud_element_size) or default
|
||||
|
||||
if fields.add then value = value + 1 end
|
||||
if fields.substract then value = value - 1 end
|
||||
|
Loading…
Reference in New Issue
Block a user