From aabd5097ed84182c1bd32dc94abcc1205dc25d09 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 30 Jan 2015 22:22:52 +0100 Subject: [PATCH] More log_id() stuff --- kernel/log.cc | 10 +++++++--- 1 file 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) -- 2.30.2