svf_jtag: suppress CR when file is in DOS format

This commit is contained in:
Gwenhael Goavec-Merou 2021-02-08 06:31:56 +01:00
parent d4692d5049
commit e91c251eb0
1 changed files with 4 additions and 0 deletions

View File

@ -260,6 +260,10 @@ void SVF_jtag::parse(string filename)
} }
while (getline(fs, str)) { while (getline(fs, str)) {
/* sanity check: DOS CR */
if (str.back() == '\r')
str.pop_back();
is_complete = false; is_complete = false;
if (str[0] == '!') // comment if (str[0] == '!') // comment
continue; continue;