summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-11-16 20:52:39 +0000
committerKUDr <kudr@openttd.org>2006-11-16 20:52:39 +0000
commit7f45482bbe87de64fc82ef2b23b38fd1634be9e1 (patch)
treee08cdb5897fbefe64a4b50ce989f9e11d4f100a1
parenta1a54976f58ade3778b376c75b0437ee91f35653 (diff)
downloadopenttd-7f45482bbe87de64fc82ef2b23b38fd1634be9e1.tar.xz
(svn r7178) -Fix: forgotten pointer dereferences (Bjarni, Bjarni, Bjarni, ...)
-rw-r--r--train_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/train_gui.c b/train_gui.c
index bd7956901..3c00d0d6e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -412,8 +412,8 @@ static void GenerateBuildList(EngineID **engines, uint16 *num_engines, EngineID
(*num_engines) = 0;
(*num_wagons) = 0;
- if (engines == NULL) ExtendEngineListSize((const EngineID**)engines, &engine_length, 25);
- if (wagons == NULL) ExtendEngineListSize((const EngineID**)wagons, &wagon_length, 25);
+ if (*engines == NULL) ExtendEngineListSize((const EngineID**)engines, &engine_length, 25);
+ if (*wagons == NULL) ExtendEngineListSize((const EngineID**)wagons, &wagon_length, 25);
for (j = 0; j < NUM_TRAIN_ENGINES; j++) {
EngineID i = GetRailVehAtPosition(j); // XXX Can be removed when the wagon list is also sorted.