Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: bug in mapgen (PR#1043)
Home

[Freeciv-Dev] Re: bug in mapgen (PR#1043)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: bug in mapgen (PR#1043)
From: jdorje@xxxxxxxxxxxxxxxxxxxxx
Date: Tue, 27 Nov 2001 11:32:20 -0800 (PST)

Raimar Falke wrote:

On Mon, Nov 26, 2001 at 06:00:12AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:

Ross W. Wetmore wrote:


I would delete the lines. I don't think they are actually used after
this point, but I didn't do an exhaustive check. Create_island() resets
them each time, and when you leave at this point you aren't looping
back to place_island().

I do not think the lines can be deleted.  The crash happens because of 
the oddball random number generation in fill_island and 
fill_island_rivers; these appear to use n/s/e/w as set up by 
create_island and place_island.  All of this takes place within make_island.
IMO the random map position should be done safely.  The attached patch 
does this in a simple (though not perfect) way.


Since they are (badly named) globals anybody could access them, but it
isn't really likely.

I strongly agree that the globals should be removed, and the data be 
passed around in a struct as Raimar's patch accomplishes.  Really, 
though, that might as well be a different patch.  Raimar: I think you 
should apply it.  If you want I'll clean it up (by removing the 
bug-related code).
The global handling has been applied as a seperate patch. I propose
this fix for the bug.

Looks good to me. I notice you found a third random-position-generating spot that needs the fix.
jason




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