Update include/gtkwave from upstream

This commit is contained in:
Wilson Snyder 2025-01-01 08:40:49 -05:00
parent 8fbb725f34
commit f5e2f60dcc
1 changed files with 4 additions and 2 deletions

View File

@ -3907,16 +3907,18 @@ while (value)
static int fstVcdIDForFwrite(char *buf, unsigned int value) static int fstVcdIDForFwrite(char *buf, unsigned int value)
{ {
char *pnt = buf; char *pnt = buf;
int len = 0;
/* zero is illegal for a value...it is assumed they start at one */ /* zero is illegal for a value...it is assumed they start at one */
while (value) while (value && len <= 14)
{ {
value--; value--;
++len;
*(pnt++) = (char)('!' + value % 94); *(pnt++) = (char)('!' + value % 94);
value = value / 94; value = value / 94;
} }
return(pnt - buf); return len;
} }