diff --git a/Tle.cpp b/Tle.cpp index 4d89624..9c47d68 100644 --- a/Tle.cpp +++ b/Tle.cpp @@ -229,7 +229,7 @@ bool Tle::ValidateLine(const std::string& line, const std::string& pattern) { while (pattern_itr != pattern.end()) { if (isdigit(*pattern_itr) || *pattern_itr == ' ' || - *pattern_itr == '.' || *pattern_itr == '-') { + *pattern_itr == '.') { /* * these characters should match exactly @@ -252,6 +252,14 @@ bool Tle::ValidateLine(const std::string& line, const std::string& pattern) { */ if (*line_itr != '+' && *line_itr != '-' && *line_itr != ' ') return false; + + } else if (*pattern_itr == '-') { + + /* + * if pattern value is '+' or a '+' + */ + if (*line_itr != '+' && *line_itr != '-') + return false; } pattern_itr++;