Skip to content

Commit c8b18ce

Browse files
committed
Add check that /issue/@num in XML matches filename
1 parent 85d20a9 commit c8b18ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/issues.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ auto lwg::parse_issue_from_file(std::string tx, std::string const & filename,
160160
}
161161
k += match.size();
162162
auto l = tx.find('\"', k);
163-
is.num = std::stoi(tx.substr(k, l-k));
163+
auto num = tx.substr(k, l-k);
164+
if (filename.find(num + ".xml") == filename.npos)
165+
std::cerr << "warning: issue number " << num << " in " << filename << " does not match issue number\n";
166+
is.num = std::stoi(num);
164167

165168
// Get issue status
166169
match = "status=\"";

0 commit comments

Comments
 (0)