Segmentation fault that crashes the game on the AI "MOVE & ATTACK" phase.
Bug Reason:
In function "unit_get_damage" of unit.c, this line was causing the seg.fault:
if ( unit->terrain->flags[cur_weather] & SWAMP )
the reason is the flags pointer was missing. It seems a certain unit did not have the terrain set. From analyzing where terrain is written, I see it is not set when loading a savegame.
Bug Fix:
In function "load_unit" of slot.c I have added the following at line 609:
unit->terrain = map[unit->x][unit->y].terrain;
In this way the units always get the terrain filled upon loading a game, which was causing the above problem.
Patch attached and licensed as GPL.
Patch for Lgeneral 1.2.3 seg. fault bug
three years later... sorry I just read this now. applied it, thanks!