(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.
This commit is contained in:
Markus Armbruster 2007-01-20 15:57:25 +00:00
parent 4091c380f1
commit 8544ef0e8d

View file

@ -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,