I guess this was *probably* fixed.


This patch aims to fix rather tricky assertion failure. It isn't easy to reproduce but does not happen so rarely when you care about few cities and their road system so that they grow effectively.

Find a city with one main road and a branch 1.5 tile long road, like this:

 |
-+-

Now, we will be using the remove road tool and try to remove the upper branch. If you try to remove the upper part of road in the '+' tile, you will get 'local authority refuses to allow this' because you would disconnect two parts of the town road system.
So now, by dragging try to remove the whole 1.5 branch road at once. Boom, assertion failure in command.c, res != res2. That's clear because in the test run it returns an error as you'd be disconecting the road system (the other road pieces stay there yet) while with DC_EXEC it works out.

The patch has a trivial fix which can have a metric ton of side effects and destroy all your savegames on currently mounted filesystems. But it works for me. Please apply or come with something better :-).

Index: command.c
===================================================================
--- command.c	(revision 748)
+++ command.c	(working copy)
@@ -396,7 +396,8 @@
 		(cmd & 0xFF) == CMD_CLEAR_AREA || 
 		(cmd & 0xFF) == CMD_CONVERT_RAIL || 
 		(cmd & 0xFF) == CMD_LEVEL_LAND ||
-		(cmd & 0xFF) == CMD_TRAIN_GOTO_DEPOT;
+		(cmd & 0xFF) == CMD_TRAIN_GOTO_DEPOT ||
+		(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD;
 
 	if (_networking && (cmd & CMD_ASYNC)) notest = true;
 
