Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions siteupdate/cplusplus/classes/Waypoint/Waypoint.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -406,13 +406,17 @@ inline void Waypoint::label_looks_hidden(DatacheckEntryList *datacheckerrors)

inline void Waypoint::label_invalid_char(DatacheckEntryList *datacheckerrors)
{ // look for labels with invalid characters
for (const char *c = label.data(); *c; c++)
if (label == "*")
datacheckerrors->add(route, label, "", "", "LABEL_INVALID_CHAR", "");
else for (const char *c = label.data(); *c; c++)
if ((*c == 42 || *c == 43) && c > label.data()
|| (*c < 40) || (*c == 44) || (*c > 57 && *c < 65)
|| (*c == 96) || (*c > 122) || (*c > 90 && *c < 95))
datacheckerrors->add(route, label, "", "", "LABEL_INVALID_CHAR", "");
for (std::string& lbl : alt_labels)
for (const char *c = lbl.data(); *c; c++)
if (lbl == "*")
datacheckerrors->add(route, lbl, "", "", "LABEL_INVALID_CHAR", "");
else for (const char *c = lbl.data(); *c; c++)
if (*c == '+' && c > lbl.data() || *c == '*' && (c > lbl.data()+1 || lbl[0] != '+')
|| (*c < 40) || (*c == 44) || (*c > 57 && *c < 65)
|| (*c == 96) || (*c > 122) || (*c > 90 && *c < 95))
Expand Down
2 changes: 1 addition & 1 deletion siteupdate/python-teresco/siteupdate.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -3936,7 +3936,7 @@ def run(self):

# look for labels with invalid first or last character
index = 0
while w.label[index] == '*':
while index < len(w.label) and w.label[index] == '*':
index += 1
if index < len(w.label) and w.label[index] in "_/(":
datacheckerrors.append(DatacheckEntry(r,[w.label],'INVALID_FIRST_CHAR', w.label[index]))
Expand Down