[Freeciv-Dev] Re: (PR#12593) Graphic errors in the FTWL client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12593 >
Jason Short wrote:
> Index: utility/ftwl/common_types.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/utility/ftwl/common_types.c,v
> retrieving revision 1.3
> diff -u -r1.3 common_types.c
> --- utility/ftwl/common_types.c 22 Jan 2005 19:45:45 -0000 1.3
> +++ utility/ftwl/common_types.c 23 Mar 2005 23:00:07 -0000
> @@ -328,19 +328,43 @@
> }
>
> /*************************************************************************
> + Normalize a rectangle by checking for a negative width or height.
> +*************************************************************************/
> +static void ct_normalize_rect(struct ct_rect *rect)
> +{
> + if (rect->width < 0) {
> + rect->x += rect->width;
> + rect->width = -rect->width;
> + }
> + if (rect->height < 0) {
> + rect->y += rect->height;
> + rect->height = -rect->height;
> + }
> +}
Hm, I think this is buggy. It should be
rect->x += (rect->width + 1);
because of the way width works (and same for height). However this
never happens in the current code.
-jason
|
|