callsign validation process fix

This commit is contained in:
richonguzman 2024-06-25 16:36:49 -04:00
parent 8bb0b0446c
commit ad1129c588
2 changed files with 2 additions and 3 deletions

View file

@ -37,7 +37,7 @@ ________________________________________________________________________________
#include "A7670_utils.h"
#endif
String versionDate = "2024.06.24";
String versionDate = "2024.06.25";
Configuration Config;
WiFiClient espClient;

View file

@ -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;
}