From bcbc0d2582cf7f0c11295f2ca23ef615f5fac712 Mon Sep 17 00:00:00 2001 From: alaindargelas Date: Wed, 2 Oct 2024 22:03:08 -0700 Subject: [PATCH] double backslash fix --- netlist_bitblast/src/BitBlaster.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/netlist_bitblast/src/BitBlaster.cpp b/netlist_bitblast/src/BitBlaster.cpp index 9407fac..fff6aab 100644 --- a/netlist_bitblast/src/BitBlaster.cpp +++ b/netlist_bitblast/src/BitBlaster.cpp @@ -39,12 +39,17 @@ namespace BITBLAST { std::string BitBlaster::filterIcarusSDFUnsupportedCharacters( const std::string &st) { std::string result; + char c_1 = ' '; for (uint32_t i = 0; i < st.size(); i++) { char c = st[i]; - if (c == '.' || c == ':' || c == '/') + if (c == '\\' && c_1 == '\\') { + result = result.substr(0, result.size()-1); + result += "_"; + } else if (c == '.' || c == ':' || c == '/') result += "_"; else result += c; + c_1 = c; } return result; }