Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2002:
[Freeciv-Dev] Re: [Patch] Stricter input checking (PR#1764)
Home

[Freeciv-Dev] Re: [Patch] Stricter input checking (PR#1764)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Stricter input checking (PR#1764)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Thu, 18 Jul 2002 22:21:51 -0400

This is a foolish mistake.

In general, requiring realness in virtually all cases is not bad. 
Requiring normalized in any but carefully orchestrated ones is very 
bad. 

Since normalize_map_pos() not only does a fast check for real, 
but also insures the output coordinates are normalized, there is
absolutely no need for an is_normal_map_pos test anywhere in the 
code - ony realness tests using normalized_map_pos() are needed. 
The replacements here are in fact errors waiting to happen and 
will bring back the chaos of the void tile years where realness 
was generally ignored.

Is_normal_map_pos was only added for debug purposes and was recognized 
at the time as having no valid use outside of this. It is an 
incomplete test for validity. It's use here is thus still invalid.

Realness of coordinates is a hard condition that can only be dealt 
with at source and is an error elsewhere. Normalized is a soft and
easily remedied one that can be handled anywhere in code - for example
as local efficiency mods. The first *is* required of game coordinates. 
The second is meaningless by itself as an incomplete test. Normalized 
is also not a rigorously defined concept while real is. Thus "passing
normalized coordinates" is only useful wrt a local definition of 
normalized.

The long arguments are in the email history - go read them. Start 
with the initial round with Gaute who was repudiated unanimously
by the list.

Since Tony seems to be moving towards a new policy of considering pros 
and cons, and I presume thus moving away from the rather autocratic and
or chaotic historical Freeciv flavour, it surely behooves maintainers to
perhaps be the first to respect this.

Cheers,
RossW
=====

At 11:17 AM 02/07/17 -0700, Raimar Falke wrote:
>
>With this patch the server now not only requires real map positions
>but also the map positions have to be supplied it their normal form.
>
>       Raimar
>
>-- 
> email: rf13@xxxxxxxxxxxxxxxxx
> "SIGDANGER - The System is likely to crash soon"
>
>Attachment Converted: "c:\program
files\eudora\attach\is_normal_map_pos1.diff"
>



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