mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fix that negative integer values for float settings don't get a ".0" suffix (#13779)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user