Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e400db

Browse files
committed
On ubuntu getline puts (or shows) '\r' at the end of line.
1 parent 9cd3049 commit 9e400db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/parser/dbcscanner.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ void DbcScanner::ParseOtherInfo(istream& readstrm)
123123

124124
sline = line;
125125

126+
if (sline.size() > 0 && sline.back() < ' ')
127+
{
128+
sline.erase(sline.size() - 1, 1);
129+
}
130+
126131
if (lparser.ParseCommentLine(&cmmnt, sline))
127132
{
128133
uint32_t found_msg_id = cmmnt.MsgId;

0 commit comments

Comments
 (0)