Attached is the patch corresponding to upstream commit 1605 which fixes
the crash due to out of boundary...

thanks
Index: src/lincity-ng/GameView.cpp
===================================================================
--- src/lincity-ng/GameView.cpp	(révision 1604)
+++ src/lincity-ng/GameView.cpp	(révision 1605)
@@ -1777,6 +1777,12 @@
 int GameView::bulldozeCost( MapPoint tile ){
     int group;
     int prize = 0;
+    if ( (tile.x < 0) || (tile.x >= WORLD_SIDE_LEN) || (tile.y < 0) || (tile.y >= WORLD_SIDE_LEN) )
+	    return 0;
+
+    if( selected_module_type == CST_NONE )
+    	return 0;
+
     if (MP_TYPE( tile.x, tile.y) == CST_USED)
         group = MP_GROUP( MP_INFO(tile.x,tile.y).int_1,
                           MP_INFO(tile.x,tile.y).int_2 );
@@ -1790,6 +1796,9 @@
     if( selected_module_type == CST_NONE ){
     	return 0;
     }
+    if ( (tile.x < 0) || (tile.x >= WORLD_SIDE_LEN) || (tile.y < 0) || (tile.y >= WORLD_SIDE_LEN) )
+	    return 0;
+
     if (MP_TYPE( tile.x, tile.y ) == CST_USED)
         return 0;
     if (( selected_module_type == CST_TRACK_LR || selected_module_type == CST_ROAD_LR ||

Reply via email to