diff options
author | tron <tron@openttd.org> | 2007-01-26 07:50:34 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-26 07:50:34 +0000 |
commit | 044f395b7b847bb9d1646caa475358966ef51833 (patch) | |
tree | 66ed373af40079ec10a0ef1dfb6cdde897d5db18 /src | |
parent | 783902838e4d3b45e595536d9d95bc02c686f6e9 (diff) | |
download | openttd-044f395b7b847bb9d1646caa475358966ef51833.tar.xz |
(svn r8410) -Fix
-Fix: Fix an out of bounds array access when assigning the engine type in the _engine array
This usually hits the _engine_name_strings array and causes an invalid StringID, though it depends on the compiler which data structure gets placed after the _engines array.
Most probably this was exposed by removing railtype from Engine, which changed the size of this struct.
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 9c30e0cbf..10a35b9a0 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -113,7 +113,6 @@ void AddTypeToEngines(void) do e->type = VEH_Road; while (++e < &_engines[SHIP_ENGINES_INDEX]); do e->type = VEH_Ship; while (++e < &_engines[AIRCRAFT_ENGINES_INDEX]); do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]); - do e->type = VEH_Special; while (++e < endof(_engines)); } void StartupEngines(void) |