From ad1129c588e3639fc4bf541c052aea17cd2ae460 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Tue, 25 Jun 2024 16:36:49 -0400 Subject: [PATCH] callsign validation process fix --- src/LoRa_APRS_iGate.cpp | 2 +- src/utils.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 0a50a11..505fd50 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -37,7 +37,7 @@ ________________________________________________________________________________ #include "A7670_utils.h" #endif -String versionDate = "2024.06.24"; +String versionDate = "2024.06.25"; Configuration Config; WiFiClient espClient; diff --git a/src/utils.cpp b/src/utils.cpp index aece816..f9e8426 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -331,7 +331,7 @@ namespace Utils { if (callsign == "WLNK-1") return true; String cleanCallsign; - if (callsign.indexOf("-")) { // SSID Validation + if (callsign.indexOf("-") > 0) { // SSID Validation cleanCallsign = callsign.substring(0, callsign.indexOf("-")); String ssid = callsign.substring(callsign.indexOf("-") + 1); if (ssid.indexOf("-") != -1 || ssid.length() > 2) return false; @@ -363,7 +363,6 @@ namespace Utils { if (!isAlpha(cleanCallsign[i - 1])) return false; } } - return true; }