[Freeciv-Dev] Re: (PR#3546) "Arhus is bugged:" - crash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason Short wrote:
> The attached patch should help to clear up the problem. I'd suggest
> that for 1.14 worker_loop should call city_can_work_tile to *verify*
> that it is valid before trying to use it. For cvs HEAD we should fix
> both of the above problems.
That would be this patch.
jason
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.207
diff -u -r1.207 cityturn.c
--- server/cityturn.c 2003/02/27 22:15:18 1.207
+++ server/cityturn.c 2003/02/28 21:12:47
@@ -203,6 +203,7 @@
}
} city_map_iterate_outwards_end;
if (bx != 0 || by != 0) {
+ assert(city_can_work_tile(pcity, bx, by));
server_set_worker_city(pcity, bx, by);
(*workers)--; /* amazing what this did with no parens! -- Syela */
*foodneed -= city_get_food_tile(bx,by,pcity) - 2;
|
|