Skip to content

Commit

Permalink
Update to latest fstapi.c file
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Dec 31, 2024
1 parent ee021db commit 875828f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vpi/fstapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3907,16 +3907,18 @@ while (value)
static int fstVcdIDForFwrite(char *buf, unsigned int value)
{
char *pnt = buf;
int len = 0;

/* zero is illegal for a value...it is assumed they start at one */
while (value)
while (value && len <= 14)
{
value--;
++len;
*(pnt++) = (char)('!' + value % 94);
value = value / 94;
}

return(pnt - buf);
return len;
}


Expand Down

0 comments on commit 875828f

Please sign in to comment.