diff --git a/bigint.lua b/bigint.lua index 7ca18f7..09fd111 100644 --- a/bigint.lua +++ b/bigint.lua @@ -27,7 +27,7 @@ local function num2tab(n) end local function str2tab(s) - local s = string.match(s, "^[+-]?%d+$") or "0" + local s = s:gsub("[ ,]", ""):match("^[+-]?%d+$") or "0" local t = {sign=1} local i = #s local j = 1