Make would_abandon() more robust
Do the right thing when caller passes a larger amount than actually there.
This commit is contained in:
parent
f89a1a711b
commit
f18502a1d1
1 changed files with 1 additions and 1 deletions
|
@ -383,6 +383,6 @@ would_abandon(struct sctstr *sp, i_type vtype, int amnt, struct lndstr *lp)
|
|||
loyalcivs = 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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue