mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue