Prevent dice overflow #27
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "overflow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rand.Int() would panic when the max value is <= 0, which happens when big.NewInt() was fed with a too large number. Avoid this by validating the big.NewInt() return beforehand. Add error handling to all callers to both gracefully return to IRC and to log an error message.
Signed-off-by: Georg Pfuetzenreuter mail@georg-pfuetzenreuter.net
94d31e829e
to5560c59614
5560c59614
to4dc94dc0cf
WIP: Prevent dice overflowto Prevent dice overflow4dc94dc0cf
to930839ab58