diff options
Diffstat (limited to 'util/format.lua')
-rw-r--r-- | util/format.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/util/format.lua b/util/format.lua index 203bdeab..0631f423 100644 --- a/util/format.lua +++ b/util/format.lua @@ -11,9 +11,7 @@ local pack = table.pack; local valid_utf8 = require "util.encodings".utf8.valid; local type = type; local dump = require "util.serialization".new("debug"); -local num_type = math.type or function (n) - return n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float"; -end +local num_type = math.type; -- In Lua 5.3+ these formats throw an error if given a float local expects_integer = { c = true, d = true, i = true, o = true, u = true, X = true, x = true, }; |