Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: init_techs integrated patch (PR#999)
Home

[Freeciv-Dev] Re: init_techs integrated patch (PR#999)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arien Malec <arien_malec@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: init_techs integrated patch (PR#999)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2001 19:47:59 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Oct 11, 2001 at 09:37:22AM -0700, Arien Malec wrote:
> Overall, looks improved: the memcpy change is a good one.
> 
> The bounds checking on array size may introduce bugs as well as save the code
> from them. If, for some reason, the code fails to A_LAST terminate in some
> circumstance, the code as it stands will fill up initial techs with some
> garbage, rather than lots of garbage or a seg fault. I guess I'd rather see
> something obviously wrong than subtly wrong.

It looks to me that the termination with A_LAST is optional if the
tech list is of size MAX_NUM_TECH_LIST. So you can have
MAX_NUM_TECH_LIST items in a tech list. This is my reading of
lookup_tech_list.

> The code below is necessary in that the game.ruleset now refers to techs, so
> you need to load game.ruleset after techs.ruleset.

I understand.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 A life? Cool! Where can I download one?


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