From 4920e5de1c39aff07a4bfccde3000eb100e63881 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj <59454579+SashLilac@users.noreply.github.com> Date: Wed, 10 Feb 2021 11:15:56 -0500 Subject: [PATCH] Added another type check to the bigint --- libs/bigint/bigint.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/bigint/bigint.lua b/libs/bigint/bigint.lua index 81b9081..4a58ad2 100644 --- a/libs/bigint/bigint.lua +++ b/libs/bigint/bigint.lua @@ -82,7 +82,8 @@ function bigint.check(big, force) assert(type(big.sign) == "string", "bigint is unsigned") for _, digit in pairs(big.digits) do assert(type(digit) == "number", digit .. " is not a number") - assert(digit < 10, digit .. " is greater than or equal to 10") + assert(digit <= 9 and digit >= 0, digit .. " is not between 0 and 9") + assert(math.floor(digit) == digit, digit .. " is not an integer") end end return true