Skip to content

Commit ed42851

Browse files
committed
clear messages, otherwise when reading a second time the messages are dublicate
1 parent 339d427 commit ed42851

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dbc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ namespace libdbc {
5858

5959
}
6060

61-
void DbcParser::parse_file(const std::string& file) {
61+
void DbcParser::parse_file(const std::string& file) {
6262
std::ifstream s(file.c_str());
6363
std::string line;
6464
std::vector<std::string> lines;
6565

66+
messages.clear();
67+
6668
parse_dbc_header(s);
6769

6870
parse_dbc_nodes(s);

0 commit comments

Comments
 (0)