Skip to content

Commit 26b5df1

Browse files
committed
update delete of star in digipeated packet
1 parent 0c3555b commit 26b5df1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/digi_utils.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern bool backupDigiMode;
4343
namespace DIGI_Utils {
4444

4545
String cleanPath(String path) {
46-
String terms[] = {"WIDE1*,", "WIDE2*,"};
46+
String terms[] = {"WIDE1*,", "WIDE2*,", "*"};
4747
for (String term : terms) {
4848
int index = path.indexOf(term);
4949
if (index != -1) path.remove(index, term.length()); // less memory than: tempPath.replace("*", "");
@@ -76,7 +76,8 @@ namespace DIGI_Utils {
7676
}
7777

7878
if (ownTokenEnd == -1) return "";
79-
return path.substring(0, ownTokenEnd) + "*" + path.substring(ownTokenEnd);
79+
String tempPacket = cleanPath(path.substring(0, ownTokenEnd));
80+
return tempPacket + "*" + path.substring(ownTokenEnd);
8081
}
8182

8283
String buildPacket(const String& path, const String& packet, bool thirdParty, bool crossFreq) {

0 commit comments

Comments
 (0)