Do not unescape identifiers starting with \$
authorClifford Wolf <clifford@clifford.at>
Fri, 1 Mar 2013 00:10:11 +0000 (01:10 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 1 Mar 2013 00:10:11 +0000 (01:10 +0100)
kernel/rtlil.h

index 1f45d120409e6fe82b1d4a6b932b8a651cb89f7f..15fec2690f261fb4626a8f4231314d18b4b61f7e 100644 (file)
@@ -105,7 +105,7 @@ namespace RTLIL
 
        static std::string unescape_id(std::string str) __attribute__((unused));
        static std::string unescape_id(std::string str) {
-               if (str.size() > 0 && str[0] == '\\')
+               if (str.size() > 1 && str[0] == '\\' && str[1] != '$')
                        return str.substr(1);
                return str;
        }