forked from github/server
parentheses to fix operator precedence.
This commit is contained in:
parent
b2d981e577
commit
59745c7ed0
|
@ -530,7 +530,7 @@ int alliedunit(const unit * u, const faction * f2, int mode)
|
|||
ally *sf;
|
||||
int automode;
|
||||
|
||||
assert(u->region); /* the unit should be in a region, but it's possible that u->number==0 (TEMP units) */
|
||||
assert(u && u->region); /* the unit should be in a region, but it's possible that u->number==0 (TEMP units) */
|
||||
if (u->faction == f2)
|
||||
return mode;
|
||||
if (u->faction != NULL && f2 != NULL) {
|
||||
|
|
|
@ -1281,7 +1281,7 @@ static int update_gbdream(const unit * u, int bonus, curse *c, const curse_type
|
|||
/* wir suchen jeweils den groessten Bonus und den groestsen Malus */
|
||||
if (sign * effect > sign * bonus) {
|
||||
if (mage == NULL || mage->number == 0
|
||||
|| sign>0?alliedunit(mage, u->faction, HELP_GUARD):!alliedunit(mage, u->faction, HELP_GUARD)) {
|
||||
|| (sign>0?alliedunit(mage, u->faction, HELP_GUARD):!alliedunit(mage, u->faction, HELP_GUARD))) {
|
||||
bonus = (int)effect;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue