diff --git a/tgt-vlog95/logic_lpm.c b/tgt-vlog95/logic_lpm.c index b3e66c3cb..1feffb16d 100644 --- a/tgt-vlog95/logic_lpm.c +++ b/tgt-vlog95/logic_lpm.c @@ -978,7 +978,7 @@ void emit_logic(ivl_scope_t scope, ivl_net_logic_t nlogic) // this encoding and create an zero based range. Need to skip the // local names _s. name = ivl_logic_basename(nlogic); - if (name) { + if (name && *name) { char *fixed_name = strdup(name); unsigned lp = strlen(name) - 1; if (fixed_name[lp] == '>') {