aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-20 07:39:21 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-20 08:21:27 +0200
commit032f2940aa63d82a2249400bdfc8c611154370c1 (patch)
tree9a7d6e2e27453edd0fa9796c57722ac93a4f83e7 /src/grt
parentb0cbebc34f3a3b1f19689f4a708f11172e8ad469 (diff)
downloadghdl-032f2940aa63d82a2249400bdfc8c611154370c1.tar.gz
ghdl-032f2940aa63d82a2249400bdfc8c611154370c1.tar.bz2
ghdl-032f2940aa63d82a2249400bdfc8c611154370c1.zip
ghwlib: never display the NO_SIG terminator.
Diffstat (limited to 'src/grt')
-rw-r--r--src/grt/ghwlib.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/grt/ghwlib.c b/src/grt/ghwlib.c
index 8d1fd8ddf..482cc3386 100644
--- a/src/grt/ghwlib.c
+++ b/src/grt/ghwlib.c
@@ -1313,8 +1313,8 @@ ghw_disp_hie (struct ghw_handler *h, struct ghw_hie *top)
ghw_disp_subtype_indication (h, hie->u.sig.type);
printf (":");
k = 0;
-
- while (1)
+ /* There can be 0-length signals. */
+ while (sigs[k] != GHW_NO_SIG)
{
/* First signal of the range. */
printf (" #%u", sigs[k]);
@@ -1324,9 +1324,6 @@ ghw_disp_hie (struct ghw_handler *h, struct ghw_hie *top)
if (num > 1)
printf ("-#%u", sigs[k + num - 1]);
k += num;
- /* End of signals ? */
- if (sigs[k] == GHW_NO_SIG)
- break;
}
n = hie->brother;
}