From 53aa1f991e28d85971ddab6460951f45562fb7c4 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 13 Feb 2026 16:56:00 +0100 Subject: [PATCH] If transistor instance is at top level, there will be no colon in the model name. --- src/xspice/icm/xtradev/degmonitor/cfunc.mod | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/xspice/icm/xtradev/degmonitor/cfunc.mod b/src/xspice/icm/xtradev/degmonitor/cfunc.mod index 18a0a66c0..52848770c 100644 --- a/src/xspice/icm/xtradev/degmonitor/cfunc.mod +++ b/src/xspice/icm/xtradev/degmonitor/cfunc.mod @@ -378,13 +378,14 @@ void cm_degmon(ARGS) /* structure holding parms, */ char *ipath = strdup(INSTMODNAME); char *colon = strchr(ipath, ':'); - if (!colon) { - cm_message_printf("Error: no colon, incompatible model name %s\n", ipath); - cm_cexit(1); - } - *colon = '\0'; char *xinstname = PARAM(instname); - snprintf(inam, 1024, "n.%s.%s.n%s", ipath, xinstname, devmod); + if (colon) { + *colon = '\0'; + snprintf(inam, 1024, "n.%s.%s.n%s", ipath, xinstname, devmod); + } + else /* top level instance only */ + snprintf(inam, 1024, "n.%s.n%s", xinstname, devmod); + loc->parentname = strdup(inam); tfree(ipath);