summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/rtlil.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index 1f45d120..15fec269 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -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;
}