mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +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
a2c5c2651a
commit
a75f564af4
@ -55,7 +55,7 @@ struct CFollowTrackT
|
|||||||
{
|
{
|
||||||
assert(!IsRailTT() || (v != NULL && v->type == VEH_TRAIN));
|
assert(!IsRailTT() || (v != NULL && v->type == VEH_TRAIN));
|
||||||
m_veh = v;
|
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)
|
FORCEINLINE void Init(Owner o, RailTypes railtype_override, CPerformanceTimer *pPerf)
|
||||||
|
Loading…
Reference in New Issue
Block a user