[Freeciv-Dev] Re: common/city.h
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Sep 24, 2001 at 03:53:11PM +0200, Dirk Stoecker wrote:
> Hi,
>
> > > I think this should be done now to fix possibly existing wrong tests long
> > > time before next release.
> >
> > You won't catch the wrong tests in the ai code. Either you audit the
> > code or add checks to ensure that there are no uninitialsed type
> > fields or other nasty things.
>
> If I understand it correctly, this was left in for security reasons, when
> these enums where introduced. So "theoretically" there should be no
> problems. Practically there maybe some, but we never find them without
> removing the =0. At least there should be none, which can be found by easy
> code reviews.
This at ./ai/aicity.c:416: "else if (!bestchoice.type &&
is_wonder(bestchoice.choice)" is one of the problems which is exists
in the code. At least I can't tell if "!bestchoice.type" should be
"bestchoice.type==CT_NONE" or "bestchoice.type==CT_BUILDING". So it is
not as easy as removing the "=0".
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"USENET is *not* the non-clickable part of WWW!"
|
|