17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 20:10:23 +01:00

fix(sonar): addressing reliability/security issues

This commit is contained in:
jerrrrycho
2026-10-03 22:33:13 +02:00
parent 3ab3cdeb2d
commit c6b76a0b72
7 changed files with 49 additions and 72 deletions

View File

@@ -2408,16 +2408,14 @@ bool TMoverParameters::IncMainCtrl(int CtrlSpeed)
if (CtrlSpeed > 1)
{
OK = IncMainCtrl(1) && IncMainCtrl(CtrlSpeed - 1); // a fail will propagate up the recursion chain. should this be || instead?
break;
}
else
++MainCtrlPos;
OK = true;
if (EIMCtrlType == 0 && ( SpeedCtrlAutoTurnOffFlag & 1 ) == 1 && MainCtrlActualPos != MainCtrlPos)
{
++MainCtrlPos;
OK = true;
if (EIMCtrlType == 0 && ( SpeedCtrlAutoTurnOffFlag & 1 ) == 1 && MainCtrlActualPos != MainCtrlPos)
{
DecScndCtrl(2);
SpeedCtrlUnit.IsActive = false;
}
DecScndCtrl(2);
SpeedCtrlUnit.IsActive = false;
}
break;
}