More log_id() stuff
authorClifford Wolf <clifford@clifford.at>
Fri, 30 Jan 2015 21:22:52 +0000 (22:22 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 30 Jan 2015 21:22:52 +0000 (22:22 +0100)
kernel/log.cc

index 061c5074cd5c44ec2a37e3f5a613741138f74649..ada2cabb222a924cb2a7e7b090f48cfe18737ecb 100644 (file)
@@ -389,9 +389,13 @@ const char *log_id(RTLIL::IdString str)
 {
        log_id_cache.insert(str);
        const char *p = str.c_str();
-       if (p[0] == '\\' && p[1] != '$' && p[1] != '\\' && p[1] != 0)
-               return p+1;
-       return p;
+       if (p[0] != '\\')
+               return p;
+       if (p[1] == '$' || p[1] == '\\' || p[1] == 0)
+               return p;
+       if (p[1] >= '0' && p[1] <= '9')
+               return p;
+       return p+1;
 }
 
 void log_cell(RTLIL::Cell *cell, std::string indent)