From e91c251eb0df6c2999cb36e84ada924e7c64410f Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 8 Feb 2021 06:31:56 +0100 Subject: [PATCH] svf_jtag: suppress CR when file is in DOS format --- src/svf_jtag.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/svf_jtag.cpp b/src/svf_jtag.cpp index ced4dfe..ddfba58 100644 --- a/src/svf_jtag.cpp +++ b/src/svf_jtag.cpp @@ -260,6 +260,10 @@ void SVF_jtag::parse(string filename) } while (getline(fs, str)) { + /* sanity check: DOS CR */ + if (str.back() == '\r') + str.pop_back(); + is_complete = false; if (str[0] == '!') // comment continue;