overflow check

This commit is contained in:
Cloud Wu
2019-04-02 17:58:28 +08:00
committed by 云风
parent 64e0c4daff
commit 56d24f46d6
2 changed files with 6 additions and 4 deletions

View File

@@ -336,8 +336,8 @@ function COMMAND.cmem()
end
function COMMAND.shrtbl()
local n, total, longest, space, slots, avg, variance = memory.ssinfo()
return { n = n, total = total, longest = longest, space = space, slots = slots, average = avg, variace = variance }
local n, total, longest, space, slots, variance = memory.ssinfo()
return { n = n, total = total, longest = longest, space = space, slots = slots, average = n / slots, variace = variance }
end
function COMMAND.ping(address)