More log_id() stuff

This commit is contained in:
Clifford Wolf 2015-01-30 22:22:52 +01:00
parent 114a78d11a
commit aabd5097ed
1 changed files with 7 additions and 3 deletions

View 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)