commit dce606fd50d54123f8b1df4ec1180a41047ff8b4
parent a65ae6fd93c6e877caf39feac5fe6bcfcbe68ddd
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 7 Dec 2023 18:01:43 -0500
fix
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -787,7 +787,11 @@ func processPot(winners []GameResult, nbPlayers, mainPot int) (winnersStr, winne
res = append(res, PlayerGain{p, piece})
mainPot -= piece
winnersStr += p.Username
- expectedSplit = mainPot / (nbPlayersInGroup - allInCount)
+ if nbPlayersInGroup-allInCount > 0 {
+ expectedSplit = mainPot / (nbPlayersInGroup - allInCount)
+ } else {
+ expectedSplit = mainPot
+ }
}
}
if allInCount == nbPlayersInGroup {