summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-19 05:55:30 +0000
committertron <tron@openttd.org>2005-01-19 05:55:30 +0000
commit654d75f795a4581582b9c4403ca7b1705504793c (patch)
tree028bd633ca2442a4309ec14fcf8f74682448fb0e
parent75863ee5cdba656e03aae059c734a32cd9556efb (diff)
downloadopenttd-654d75f795a4581582b9c4403ca7b1705504793c.tar.xz
(svn r1564) ISO C90 forbids mixed declarations and code (bad bjarni, no cookie)
-rw-r--r--vehicle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index a4cb2a08e..688e78aa9 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1464,8 +1464,10 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if ( rvi2->flags & RVI_MULTIHEAD && !(rvi->flags & RVI_MULTIHEAD) && v->index == first->index) {
if (old_engine_type == u->engine_type ) {
+ Vehicle *w;
+
u = GetLastVehicleInChain(v);
- Vehicle *w = GetPrevVehicleInChain(u);
+ w = GetPrevVehicleInChain(u);
w->next = NULL;
DeleteVehicle(u);
}