From a3804b25e7863ed040d419f7f76c1101bea1c998 Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 14 Apr 2014 11:48:56 +0200 Subject: [PATCH] Fixes #967 --- radio/src/gui/menus.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radio/src/gui/menus.cpp b/radio/src/gui/menus.cpp index f29924a6b..6aeb994c3 100644 --- a/radio/src/gui/menus.cpp +++ b/radio/src/gui/menus.cpp @@ -1478,6 +1478,10 @@ bool isSwitchAvailable(int swtch) return false; } + if (swtch < 0) { + swtch = -swtch; + } + if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) { LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_CSW); return (cs->func != LS_FUNC_NONE);