From 87d08f0151e643951769e323995f1c5ed89ee200 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 01:50:17 -0400 Subject: fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths --- internal/casino/types.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/casino/types.go') diff --git a/internal/casino/types.go b/internal/casino/types.go index 283aa43..49e2cc4 100644 --- a/internal/casino/types.go +++ b/internal/casino/types.go @@ -128,6 +128,12 @@ func (c MachineConfig) Normalize() MachineConfig { if c.MaxBet <= 0 { c.MaxBet = DefaultMaxBet } + // Never leave a normalized config self-contradictory: a min_bet above + // the default cap must widen the effective maximum rather than produce + // a game every wager is rejected from. + if c.MaxBet < c.MinBet { + c.MaxBet = c.MinBet + } if c.SpinTicks <= 0 { c.SpinTicks = 2 } @@ -153,6 +159,9 @@ func (c TableConfig) Normalize() TableConfig { if c.MaxBet <= 0 { c.MaxBet = DefaultMaxBet } + if c.MaxBet < c.MinBet { + c.MaxBet = c.MinBet + } return c } -- cgit v1.2.3