mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-02 20:34:41 +00:00
(svn r16521) -Fix [FS#2946] (r13945): Do not access 'compatible_railtypes' for road vehicles. (causing invalid reads since r16391/16392)
This commit is contained in:
parent
ad5f018195
commit
4554c79b54
@ -55,7 +55,7 @@ struct CFollowTrackT
|
||||
{
|
||||
assert(!IsRailTT() || (v != NULL && v->type == VEH_TRAIN));
|
||||
m_veh = v;
|
||||
Init(v != NULL ? v->owner : INVALID_OWNER, railtype_override == INVALID_RAILTYPES ? ((const Train *)v)->compatible_railtypes : railtype_override, pPerf);
|
||||
Init(v != NULL ? v->owner : INVALID_OWNER, IsRailTT() && railtype_override == INVALID_RAILTYPES ? ((const Train *)v)->compatible_railtypes : railtype_override, pPerf);
|
||||
}
|
||||
|
||||
FORCEINLINE void Init(Owner o, RailTypes railtype_override, CPerformanceTimer *pPerf)
|
||||
|
Loading…
Reference in New Issue
Block a user