From 6ef40a5739f1723ec26cc32dfc48fe764f776dca Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 19:57:45 -0400 Subject: fix: durable payouts survive journal failure, cap bank withdrawals, hash passwords off the owner loop. --- internal/game/cmd_bank.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/cmd_bank.go') diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go index 8da6e89..264bab2 100644 --- a/internal/game/cmd_bank.go +++ b/internal/game/cmd_bank.go @@ -390,6 +390,12 @@ func (g *Game) doBankWithdrawCredits(sess *net.Session, parts []string) { sess.WriteLine("You don't have that many banked credits.") return } + // The withdrawal must respect the shared economy cap: banked credits + // are not part of the on-hand balance, so the sum can exceed it. + if _, capErr := addCreditsChecked(p.Credits, amount); capErr != nil { + sess.WriteLine("Your wallet cannot hold that many credits.") + return + } p.BankedCredits -= amount p.Credits += amount g.saveCharacter(p) -- cgit v1.2.3