From a16af46af96c06e67928d0f90dd814bbe3fcd26b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 11 May 2008 10:20:40 +0200 Subject: [PATCH] Fix test for capital in caploss() to check country status Test for STAT_ACTIVE instead of non-zero country number. Inactive countries have no capital they could lose! --- src/lib/subs/caploss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/subs/caploss.c b/src/lib/subs/caploss.c index 1d83c1a0..54c70248 100644 --- a/src/lib/subs/caploss.c +++ b/src/lib/subs/caploss.c @@ -54,9 +54,9 @@ caploss(struct sctstr *sp, natid coun, char *msg) int loan_num = 0; int comm_num = 0; - if (coun == 0) - return; natp = getnatp(coun); + if (natp->nat_stat != STAT_ACTIVE) + return; if (sp->sct_x != natp->nat_xcap || sp->sct_y != natp->nat_ycap) return; if (coun == player->cnum)