diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/log.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index 061c5074c..ada2cabb2 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -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) |