<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39634 >

On 30/08/2007, Pepeto _ <[EMAIL PROTECTED]> wrote:
>
> I looked at the code it seems it's not what I described. But I think
> it's something linked to this. BUT, I found a bad code line in this code
> which must be changed:
>   wakeup_neighbor_sentries(punit);
>   if (!unit_survive_autoattack(punit)) {
>     return FALSE;
>   }
>   maybe_make_contact(pdesttile, unit_owner(punit));
>
>   conn_list_do_unbuffer(pplayer->connections);
>
> if the unit doesn't survive to the attack the connection list is not
> free

 Fix for that one.


 - ML

diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c	2007-08-06 16:42:12.000000000 +0300
+++ freeciv/server/unittools.c	2007-08-31 00:59:37.000000000 +0300
@@ -2885,6 +2885,7 @@
 		     API_TYPE_TILE, pdesttile);
   wakeup_neighbor_sentries(punit);
   if (!unit_survive_autoattack(punit)) {
+    conn_list_do_unbuffer(pplayer->connections);
     return FALSE;
   }
   maybe_make_contact(pdesttile, unit_owner(punit));
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to