Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#8619) Obscure Bug related to ISO coordinated and BORDE
Home

[Freeciv-Dev] (PR#8619) Obscure Bug related to ISO coordinated and BORDE

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8619) Obscure Bug related to ISO coordinated and BORDER macro
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Thu, 29 Apr 2004 07:19:20 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8619 >

Hi,
I was implemented the macro IS_BORDER_MAP_POS for the iso coordinate and
i get a obcure segfault
then i implement it more clear as a function and i get a infinite loop
fault in topology 7
valgrind say about error reads
==27693== Invalid read of size 4
==27693==    at 0x8070E31: smooth_map (map.h:670)
==27693==    by 0x8070B44: mapgenerator1 (mapgen.c:1388)
==27693==    by 0x80707ED: map_fractal_generate (mapgen.c:1319)
==27693==    by 0x804F9AC: srv_loop (srv_main.c:1635)
....
my easy test function is
bool IS_BORDER_MAP_POS(int map_x, int map_y, int dist)
{
    int x, y;
    map_to_native_pos(&x, &y, map_x, map_y);
    return ((x) < (dist) || (x) >= map.xsize - (dist)
            || (y) < (dist) || (y) >= map.ysize - (dist));
}
there are a problem there!
Marcelo

Attachment: Bug_related_to_ISO_and_BORDER.diff
Description: Binary data

Attachment: test.serv
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8619) Obscure Bug related to ISO coordinated and BORDER macro, Marcelo Burda <=