aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/jsonschema.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/jsonschema.lua b/util/jsonschema.lua
index 48a3351f..eafa8b7c 100644
--- a/util/jsonschema.lua
+++ b/util/jsonschema.lua
@@ -1,7 +1,7 @@
-- This file is generated from teal-src/util/jsonschema.lua
-local m_type = math.type or function (n)
- return n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
+local m_type = function(n)
+ return type(n) == "number" and n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
end;
local json = require("util.json")
local null = json.null;
@@ -81,7 +81,7 @@ function complex_validate(schema, data, root)
if type(data) == "table" then
for i in pairs(data) do
- if not (math.type(i) == "integer") then
+ if not (m_type(i) == "integer") then
return false
end
end