Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] (PR#5286) Server crash involving diplomacy
Home

[Freeciv-Dev] (PR#5286) Server crash involving diplomacy

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#5286) Server crash involving diplomacy
From: "Guest" <rt-guest@xxxxxxxxxxxxxx>
Date: Thu, 21 Aug 2003 12:24:33 -0700
Reply-to: rt@xxxxxxxxxxxxxx

If I have alliances with two AI nations which haven't contacted each
other, and one nation puts a unit on board my ship, the other eventually
considers attacking that unit (as part of find_something_to_kill) and
triggers an ASSERTion in the server, crashing it.  The simple solution
that I see (which works) is to make pplayers_at_war actually check for
war, not war or non-contact.  I suspect there are many places where
treating uncontacted aliies of allies as enemies will cause lossage.

Is there some reason that it's currently overbroad?

--- freeciv-cvs-Aug-13-orig/common/player.c     2003-08-13
22:41:34.000000000 +0000
+++ freeciv-cvs-Aug-13/common/player.c  2003-08-21 15:17:18.000000000 +0000
@@ -577,7 +577,7 @@
   if (is_barbarian(pplayer) || is_barbarian(pplayer2)) {
     return TRUE;
   }
-  return ds == DS_WAR || ds == DS_NO_CONTACT;
+  return ds == DS_WAR;
 }
 
 /***************************************************************



[Prev in Thread] Current Thread [Next in Thread]