mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Fix that negative integer values for float settings don't get a ".0" suffix (#13779)
This commit is contained in:
parent
83b85ba16a
commit
1a568cc491
@ -113,7 +113,7 @@ end
|
|||||||
|
|
||||||
make.float = make_field(tonumber, is_valid_number, function(x)
|
make.float = make_field(tonumber, is_valid_number, function(x)
|
||||||
local str = tostring(x)
|
local str = tostring(x)
|
||||||
if str:match("^%d+$") then
|
if str:match("^[+-]?%d+$") then
|
||||||
str = str .. ".0"
|
str = str .. ".0"
|
||||||
end
|
end
|
||||||
return str
|
return str
|
||||||
|
Loading…
Reference in New Issue
Block a user