Make setrel() refuse to change relations to self
No current caller actually attempts that, but let's make it obvious.
This commit is contained in:
parent
d4f0cb3576
commit
985ec19f8b
1 changed files with 2 additions and 0 deletions
|
@ -60,6 +60,8 @@ setrel(natid us, natid them, int rel)
|
||||||
rel = ALLIED;
|
rel = ALLIED;
|
||||||
if (CANT_HAPPEN(!mynp || !themnp))
|
if (CANT_HAPPEN(!mynp || !themnp))
|
||||||
return;
|
return;
|
||||||
|
if (us == them)
|
||||||
|
return;
|
||||||
oldrel = getrel(mynp, them);
|
oldrel = getrel(mynp, them);
|
||||||
if (oldrel == rel)
|
if (oldrel == rel)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue