Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2006:
[Freeciv-Dev] Re: (PR#16348) Lua crash
Home

[Freeciv-Dev] Re: (PR#16348) Lua crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#16348) Lua crash
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 20 May 2006 04:36:08 -0700
Reply-to: bugs@xxxxxxxxxxx

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

On Sun, 9 Apr 2006, Per I. Mathisen wrote:
> The following seemingly correct script (almost identical to examples in
> the wiki events documentation) will crash the server:

Patch. Will commit immediately.

   - Per
Index: server/scripting/api_actions.c
===================================================================
--- server/scripting/api_actions.c      (revision 11947)
+++ server/scripting/api_actions.c      (working copy)
@@ -33,7 +33,7 @@
                              int moves_left)
 {
   return create_unit(pplayer, ptile, ptype, veteran_level,
-                    homecity->id, moves_left);
+                    homecity ? homecity->id : 0, moves_left);
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#16348) Lua crash, Per I. Mathisen <=