Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10113) genlist_unlink bug
Home

[Freeciv-Dev] (PR#10113) genlist_unlink bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10113) genlist_unlink bug
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Sep 2004 15:59:39 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10113 >

Oops.  Here is the correct fix.

jason

? settler_recursion_crash
Index: utility/genlist.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/genlist.c,v
retrieving revision 1.15
diff -u -r1.15 genlist.c
--- utility/genlist.c   14 Sep 2004 21:10:44 -0000      1.15
+++ utility/genlist.c   14 Sep 2004 22:58:03 -0000
@@ -100,7 +100,7 @@
       plink = plink->next;
     }
     
-    if(plink->dataptr==punlink) {
+    if (plink && plink->dataptr == punlink) {
       if(pgenlist->head_link==plink)
         pgenlist->head_link=plink->next;
       else

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