diff --git a/t-vvm.cc b/t-vvm.cc index 531794b8f..1bcc74fca 100644 --- a/t-vvm.cc +++ b/t-vvm.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: t-vvm.cc,v 1.155 2000/06/03 02:13:43 steve Exp $" +#ident "$Id: t-vvm.cc,v 1.156 2000/06/06 02:32:45 steve Exp $" #endif # include @@ -296,7 +296,8 @@ static const char*vvm_val_name(verinum::V val, return "HiZ"; } - return ""; + /* This should not happen! */ + return "?strength?"; } @@ -2144,9 +2145,12 @@ void target_vvm::proc_assign(ostream&os, const NetAssign*net) string nexus = nexus_from_link(&net->pin(idx)); unsigned ncode = nexus_wire_map[nexus]; - const char*rval = vvm_val_name(value.get(idx), - Link::STRONG, - Link::STRONG); + verinum::V val = idx < value.len() + ? value.get(idx) + : verinum::V0; + const char*rval = vvm_val_name(val, + Link::STRONG, + Link::STRONG); defn << " nexus_wire_table[" <