Make would_abandon() more robust

Do the right thing when caller passes a larger amount than actually
there.
This commit is contained in:
Markus Armbruster 2008-03-24 10:08:54 +01:00
parent f89a1a711b
commit f18502a1d1

View file

@ -383,6 +383,6 @@ would_abandon(struct sctstr *sp, i_type vtype, int amnt, struct lndstr *lp)
loyalcivs = 0; loyalcivs = 0;
return sp->sct_own != 0 return sp->sct_own != 0
&& loyalcivs == 0 && mil == 0 && loyalcivs <= 0 && mil <= 0
&& !has_units(sp->sct_x, sp->sct_y, sp->sct_own, lp); && !has_units(sp->sct_x, sp->sct_y, sp->sct_own, lp);
} }