diff options
author | KUDr <KUDr@openttd.org> | 2006-11-16 20:52:39 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2006-11-16 20:52:39 +0000 |
commit | b44fce7a86c960e395bb7eeedd98d78c8a42f82f (patch) | |
tree | e08cdb5897fbefe64a4b50ce989f9e11d4f100a1 /train_gui.c | |
parent | 32fac5c2aa0bb51ec25b733e0a1cdbb13baf33cb (diff) | |
download | openttd-b44fce7a86c960e395bb7eeedd98d78c8a42f82f.tar.xz |
(svn r7178) -Fix: forgotten pointer dereferences (Bjarni, Bjarni, Bjarni, ...)
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 4 |
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. |