From: Clifford Wolf Date: Fri, 1 Mar 2013 00:10:11 +0000 (+0100) Subject: Do not unescape identifiers starting with \$ X-Git-Tag: yosys-0.2.0~771 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51c2b797b34e1681bc5dbfcbebc1f45ca2294c0b;p=yosys.git Do not unescape identifiers starting with \$ --- diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 1f45d1204..15fec2690 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; }