From 8544ef0e8d76abe5b75cf036de1084d2715df76c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 20 Jan 2007 15:57:25 +0000 Subject: [PATCH] (coll): Fix freeing of repaid loan. The incorrectly freed loan continued to exist. Fortunately, both shark and collect refused to touch it. fina() and repa() oopsed in loan_owed(), and recovered by assuming (incorrectly!) a plausible debt. Before trdsub.c rev. 1.7, fina() catched and logged the bug, and ignored the loan, and repa() computed a ridiculous debt. --- src/lib/commands/coll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/commands/coll.c b/src/lib/commands/coll.c index 495fbb19..535f8da9 100644 --- a/src/lib/commands/coll.c +++ b/src/lib/commands/coll.c @@ -127,6 +127,7 @@ coll(void) nreport(player->cnum, N_SEIZE_SECT, loan.l_lonee, 1); owed = loan_owed(&loan, time(&now)); if (pay >= owed) { + loan.l_status = LS_FREE; loan.l_ldur = 0; nreport(loan.l_lonee, N_REPAY_LOAN, player->cnum, 1); wu(0, loan.l_lonee,