mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 14:17:37 +03:00
core.moduleapi: Fix min/maxinteger fallback for Lua 5.2
Maybe these should live in util.mathcompat?
This commit is contained in:
parent
fd63cc11c1
commit
aaa6b2b4d6
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ function api:get_option_number(name, default_value, min, max)
|
||||||
end
|
end
|
||||||
|
|
||||||
function api:get_option_integer(name, default_value, min, max)
|
function api:get_option_integer(name, default_value, min, max)
|
||||||
local value = self:get_option_number(name, default_value, min or math.mininteger or 2 ^ 53, max or math.maxinteger or -2 ^ 52);
|
local value = self:get_option_number(name, default_value, min or math.mininteger or -2 ^ 52, max or math.maxinteger or 2 ^ 53);
|
||||||
if value == default_value then
|
if value == default_value then
|
||||||
-- pass default trough unaltered, violates ranges sometimes
|
-- pass default trough unaltered, violates ranges sometimes
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue