Changeset - r1921:305bb198f333
[Not reviewed]
master
0 1 0
hackykid - 19 years ago 2005-06-06 21:32:04
hackykid@openttd.org
(svn r2427) - Fix: CmdMoveRailVehice; Prevent possible assertion failure when moving vehicles within one chain.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
train_cmd.c
Show inline comments
 
@@ -845,6 +845,9 @@ int32 CmdMoveRailVehicle(int x, int y, u
 
				src_head = NULL;
 
			}
 
		} else {
 
			// if moving within the same chain, dont use dst_head as it may get invalidated
 
			if (src_head == dst_head)
 
				dst_head = NULL;
 
			// unlink single wagon from linked list
 
			src_head = UnlinkWagon(src, src_head);
 
			src->next = NULL;
0 comments (0 inline, 0 general)