aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-17 02:32:47 +0200
committerKim Alvefur <zash@zash.se>2023-07-17 02:32:47 +0200
commitaaa6b2b4d6bda341638b88ebdb6e766cedf30a56 (patch)
tree40755263fa2431f0eca0d883d934fd596472d271 /core
parentfd63cc11c17489fe604585040948a8d270cfd70b (diff)
downloadprosody-aaa6b2b4d6bda341638b88ebdb6e766cedf30a56.tar.gz
prosody-aaa6b2b4d6bda341638b88ebdb6e766cedf30a56.zip
core.moduleapi: Fix min/maxinteger fallback for Lua 5.2
Maybe these should live in util.mathcompat?
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 9a4100f7..fdd2ef30 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -255,7 +255,7 @@ function api:get_option_number(name, default_value, min, max)
end
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
-- pass default trough unaltered, violates ranges sometimes
return value;