Hi, I've written a little patch to the stable tree, as a way to acquaint myself with the code of freeciv. The patch adds the new functionality of plagues to game, which are determined randomly based on the size, pollution, improvements and trade routes of a city. The patch segfaults on me. I get that massage: Program received signal SIGSEGV, Segmentation fault. 0x000000000041bd7d in pay_for_units (pplayer=0x861e18, pcity=0x1890fc0) at ../utility/speclist.h:110 110 return genlist_size(tthis->list);
it only happens when the game.info.plague_on is true, but I do not understand what genlist_size() does, or where and why it is called. It is my first attempt at adding code to freeciv, and I've spent some nights trying to understand what went wrong, but I'm kinda clueless. I guess it's not a bug, but rather a I didn't do something they it should be done, but I could find what that is. Attached is the patch. I will appreciate any help, even in explaining me what genlist_size does. Luftzig.
Description: Binary data
_______________________________________________ Freeciv-dev mailing list Freecivemail@example.com https://mail.gna.org/listinfo/freeciv-dev