# HG changeset patch # User Kim Alvefur # Date 1689553967 -7200 # Node ID b1c2e70de470302bf49f73c0f2cf2e6ddd019f7f # Parent 5022525364f67ef801860d424e8d56c3e5751d3d core.moduleapi: Fix min/maxinteger fallback for Lua 5.2 Maybe these should live in util.mathcompat? diff -r 5022525364f6 -r b1c2e70de470 core/moduleapi.lua --- a/core/moduleapi.lua Mon Jul 17 02:26:16 2023 +0200 +++ b/core/moduleapi.lua Mon Jul 17 02:32:47 2023 +0200 @@ -255,7 +255,7 @@ 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;