Fix that negative integer values for float settings don't get a ".0" suffix (#13779)

This commit is contained in:
Gregor Parzefall 2023-09-05 15:36:05 +02:00 committed by GitHub
parent 83b85ba16a
commit 1a568cc491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -113,7 +113,7 @@ end
make.float = make_field(tonumber, is_valid_number, function(x)
local str = tostring(x)
if str:match("^%d+$") then
if str:match("^[+-]?%d+$") then
str = str .. ".0"
end
return str