Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: [FreeCiv-Cvs] per: Fix a division by zero that happens
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] per: Fix a division by zero that happens

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] per: Fix a division by zero that happens if we reque...
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 11 Oct 2002 03:52:11 -0700

On Fri, Oct 11, 2002 at 08:20:53AM +0000, Per I. Mathisen wrote:
> On Thu, 10 Oct 2002, Raimar Falke wrote:
> > So IMHO the core dump shouldn't happen. That isn't the expected
> > result. Attached is a patch which:
> >  - adds some asserts
> >  - makes choose_goal_tech static
> >  - formatting
> >  - s/int/bool/
> >  - some docu
> 
> Not sure if you suggested that, but I'm totally opposed to adding this
> patch before release. Adding asserts to a problem that is not properly
> understood is a recipe for bugs. My fix has the advantage of being
> guaranteed not to introduce new bugs, yet avoiding the core dump.

Just adding these asserts doesn't introduce bugs. The problem is that
the issue is rare. So we can only catch it if we:
 - add some something which can catch it (if only your patch is
applied this isn't the case) AND
 - we expose the changes to a lot of games/people (before a release is
the best time).

> After the release, however, I'm for it.

Then we will forget and your band-aid will stay there eternal. we both
know the laziness involved in such issues.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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