diff --git a/lib/APRSPacketLib/APRSPacketLib.cpp b/lib/APRSPacketLib/APRSPacketLib.cpp index 67ed035..e207788 100644 --- a/lib/APRSPacketLib/APRSPacketLib.cpp +++ b/lib/APRSPacketLib/APRSPacketLib.cpp @@ -271,7 +271,7 @@ namespace APRSPacketLib { bool thirdParty = false; int firstColonIndex = packet.indexOf(":"); - if (firstColonIndex > 0 && firstColonIndex < packet.length() && packet[firstColonIndex + 1] == '}') thirdParty = true; + if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] == '}') thirdParty = true; String temp; if (thirdParty) { // only header is used