watbot/wat
Georg Pfuetzenreuter 930839ab58
Prevent dice overflow
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.
Rename the shadowed "max" variable whilst at it to avoid confusion.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-10-10 18:43:46 +02:00
..
bot.go Configurable database path 2024-10-10 00:04:16 +02:00
db.go Configurable database path 2024-10-10 00:04:16 +02:00
game.go Prevent dice overflow 2024-10-10 18:43:46 +02:00
integration.go Lower nickname in Jeopardy cashout 2024-10-09 23:36:45 +02:00
utils.go Prevent dice overflow 2024-10-10 18:43:46 +02:00