Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
Home

[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 16:32:11 -0700 (PDT)

On Mon, 20 Aug 2001, Raimar Falke wrote:
> given id is still valid. A pointer will always be valid. So a new
> field in every struct is needed to indicate invalid structs. Such a
> flag will be set if a remove_unit packet is received for example.

But then the structure is freed, so who knows what the valid field will get
changed to, since it's now in free memory.  And if you pass in a random
pointer, who's to say that it won't have the right bytes to give it a proper
valid field?



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