mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-07 06:46:43 +00:00
(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.
This commit is contained in:
parent
f4dad30da7
commit
c9f4c637fb
@ -113,7 +113,6 @@ void AddTypeToEngines(void)
|
|||||||
do e->type = VEH_Road; while (++e < &_engines[SHIP_ENGINES_INDEX]);
|
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_Ship; while (++e < &_engines[AIRCRAFT_ENGINES_INDEX]);
|
||||||
do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]);
|
do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]);
|
||||||
do e->type = VEH_Special; while (++e < endof(_engines));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartupEngines(void)
|
void StartupEngines(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user