1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00
This commit is contained in:
bsongis 2014-04-14 11:48:56 +02:00
parent 48161129e3
commit a3804b25e7

View file

@ -1478,6 +1478,10 @@ bool isSwitchAvailable(int swtch)
return false; return false;
} }
if (swtch < 0) {
swtch = -swtch;
}
if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) { if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) {
LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_CSW); LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_CSW);
return (cs->func != LS_FUNC_NONE); return (cs->func != LS_FUNC_NONE);