Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] Re: (PR#14369) AutoReply: civserver crashes on startup (am
Home

[Freeciv-Dev] Re: (PR#14369) AutoReply: civserver crashes on startup (am

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#14369) AutoReply: civserver crashes on startup (amd64)
From: "David A Knight" <david@xxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Oct 2005 08:59:29 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This transaction appears to have no content
attached patch fixes the crash + seems to be running without problems.

-- 
Make your website SCREEM - Site Creating & Editing EnvironMent

URL:  http://www.screem.org/
Mail: david@xxxxxxxxxx

Index: server/ruleset.c
===================================================================
--- server/ruleset.c    (revision 11151)
+++ server/ruleset.c    (working copy)
@@ -2216,7 +2216,7 @@

     civilwar_nations = secfile_lookup_str_vec(file, &dim,
                                              "%s.civilwar_nations", sec[i]);
-    pl->civilwar_nations = fc_malloc(sizeof(Nation_type_id) * (dim + 1));
+    pl->civilwar_nations = fc_malloc(sizeof(struct nation_type*) * (dim + 1));

     for (j = 0, k = 0; k < dim; j++, k++) {
       /* HACK: At this time, all the names are untranslated and the name_orig
Index: common/unittype.c
===================================================================
--- common/unittype.c   (revision 11151)
+++ common/unittype.c   (working copy)
@@ -526,13 +526,12 @@
       n_with_role[i]++;
     }
   } unit_type_iterate_end;
-
   if(n_with_role[i] > 0) {
-    with_role[i] = fc_malloc(n_with_role[i]*sizeof(Unit_type_id));
+    with_role[i] = fc_malloc(n_with_role[i]*sizeof(struct unit_type*));
     j = 0;
     unit_type_iterate(u) {
       if (func_has(u, i)) {
-       with_role[i][j++] = u;
+       with_role[i][j++] = u;
       }
     } unit_type_iterate_end;
     assert(j==n_with_role[i]);

Attachment: signature.asc
Description: PGP signature


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