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

[Freeciv-Dev] suspicious code in road_bonus(int x, int y, int spc) (PR#2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] suspicious code in road_bonus(int x, int y, int spc) (PR#2144)
From: STyx <sylvaintricot@xxxxxxx>
Date: Mon, 7 Oct 2002 13:48:17 -0700 (PDT)

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 {
...




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