Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: suspicious code in road_bonus(int x, int y, int spc) (
Home

[Freeciv-Dev] Re: suspicious code in road_bonus(int x, int y, int spc) (

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: STyx <sylvaintricot@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: suspicious code in road_bonus(int x, int y, int spc) (PR#2144)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 17 Oct 2002 00:01:06 +0200

On Mon, Oct 07, 2002 at 01:48:17PM -0700, STyx wrote:
> suspicious code in road_bonus(int x, int y, int spc)
> 
> te[k] is not set.
> 
> /home/styx/st/dev/fc/freeciv-1.13.0/server/settlers.c:634
> freeciv-1.13.0/server/barbarian.c:634:
>     if (is_border && !normalize_map_pos(&x1, &y1)) {
>       rd[k] = FALSE;
>     } else {
>       ptile = map_get_tile(x1, y1);
>       rd[k] = tile_has_special(ptile, spc);
>       te[k] = (ptile->terrain == T_MOUNTAINS || ptile->terrain == T_OCEAN);
> 
> 
> correction:
>     if (is_border && !normalize_map_pos(&x1, &y1)) {
>       rd[k] = FALSE; te[k]=TRUE;
>     } else {
> ...

Already spotted and fixed.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Reality? That's where the pizza delivery guy comes from!"


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