Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] Re: (PR#13745) savegame crash
Home

[Freeciv-Dev] Re: (PR#13745) savegame crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#13745) savegame crash
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 23 Aug 2005 01:29:44 -0700
Reply-to: bugs@xxxxxxxxxxx

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

On Tue, 23 Aug 2005, Per I. Mathisen wrote:
> Isn't the real problem that we try to save a target government when we
> have no target government?

--- server/savegame.c   21 Jul 2005 19:32:05 -0000      1.197.2.18
+++ server/savegame.c   23 Aug 2005 08:28:56 -0000
@@ -2440,9 +2440,11 @@
   secfile_insert_int(file, old_government_id(gov),
                      "player%d.government", plrno);

-  gov = get_government(plr->target_government);
-  secfile_insert_str(file, gov->name_orig,
-                    "player%d.target_government_name", plrno);
+  if (plr->target_government != G_MAGIC) {
+    gov = get_government(plr->target_government);
+    secfile_insert_str(file, gov->name_orig,
+                       "player%d.target_government_name", plrno);
+  }

   secfile_insert_int(file, plr->embassy, "player%d.embassy", plrno);

Committed.

  - Per





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