Changeset

13215:b1c2e70de470

core.moduleapi: Fix min/maxinteger fallback for Lua 5.2 Maybe these should live in util.mathcompat?
author Kim Alvefur <zash@zash.se>
date Mon, 17 Jul 2023 02:32:47 +0200
parents 13214:5022525364f6
children 13218:e576c6a0d1f8
files core/moduleapi.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;