Skip to content

Commit 20259bc

Browse files
committed
fix(test): change while loop of the iterator for value description to for loop to try and prevent windows debug build from infinite loops
1 parent 62ab439 commit 20259bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/dbc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ void DbcParser::parse_dbc_messages(const std::vector<std::string>& lines) {
194194
std::regex description_re("\\s(\\d+)\\s\"([^\"]*)\"");
195195

196196
std::sregex_iterator desc_iter(rest_of_descriptions.begin(), rest_of_descriptions.end(), description_re);
197-
std::sregex_iterator desc_end;
197+
std::sregex_iterator desc_end = std::sregex_iterator();
198198

199199
std::vector<Signal::SignalValueDescriptions> values{};
200-
while (desc_iter != desc_end) {
200+
for (std::sregex_iterator i = desc_iter; i != desc_end; ++i) {
201201
std::smatch desc_match = *desc_iter;
202202
uint32_t number = static_cast<uint32_t>(std::stoul(desc_match.str(1)));
203203
std::string text = desc_match.str(2);

0 commit comments

Comments
 (0)
X