Fix 55170ae: [Script] Building two-way signals could end up one-way

This commit is contained in:
glx22
2022-05-27 17:54:41 +02:00
committed by Loïc Guilloux
parent 992c72c0cb
commit ed1457dca3
3 changed files with 60 additions and 10 deletions

View File

@@ -463,6 +463,8 @@ static bool IsValidSignalType(int signal_type)
if (signal < SIGNALTYPE_TWOWAY) {
if (signal != SIGNALTYPE_PBS && signal != SIGNALTYPE_PBS_ONEWAY) signal_cycles++;
} else {
signal_cycles = 0;
}
::SignalType sig_type = (::SignalType)(signal >= SIGNALTYPE_TWOWAY ? signal ^ SIGNALTYPE_TWOWAY : signal);