diff options
author | peter1138 <peter1138@openttd.org> | 2005-11-06 10:17:20 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-11-06 10:17:20 +0000 |
commit | de769333374794a15781883485a0ed4bbab8b5e7 (patch) | |
tree | d8cc1c838ff1df6e670498a66f35b2a0ebe2320a | |
parent | 63842939ed204862b2b4e22db2102c66ce06fec5 (diff) | |
download | openttd-de769333374794a15781883485a0ed4bbab8b5e7.tar.xz |
(svn r3145) Fix two off-by-one errors in building articulated rail vehicles.
-rw-r--r-- | train_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index d39535bfd..bf4141ca2 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -439,7 +439,7 @@ static uint CountArticulatedParts(const RailVehicleInfo *rvi, EngineID engine_ty break; } - return i; + return i - 1; } static void AddArticulatedParts(const RailVehicleInfo *rvi, Vehicle **vl) @@ -463,7 +463,7 @@ static void AddArticulatedParts(const RailVehicleInfo *rvi, Vehicle **vl) u->next = vl[i]; u = u->next; - engine_type = GB(callback, 0, 6); + engine_type = GB(callback, 0, 7); flip_image = HASBIT(callback, 7); rvi_artic = RailVehInfo(engine_type); |