diff --git a/vpi/stringheap.c b/vpi/stringheap.c index 3ca42fccc..8ca744553 100644 --- a/vpi/stringheap.c +++ b/vpi/stringheap.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: stringheap.c,v 1.1 2003/02/13 18:13:28 steve Exp $" +#ident "$Id: stringheap.c,v 1.2 2003/04/28 01:03:11 steve Exp $" #endif # include "stringheap.h" @@ -47,9 +47,10 @@ const char*strdup_sh(struct stringheap_s*hp, const char*txt) hp->cell_off = 0; } - if ((STRINGHEAP_SIZE - hp->cell_off) <= len) { + if ((STRINGHEAP_SIZE - hp->cell_off - 1) <= len) { struct stringheap_cell*tmp = malloc(PAGE_SIZE); tmp->next = hp->cell_lst; + hp->cell_lst = tmp; hp->cell_off = 0; } @@ -63,6 +64,9 @@ const char*strdup_sh(struct stringheap_s*hp, const char*txt) /* * $Log: stringheap.c,v $ + * Revision 1.2 2003/04/28 01:03:11 steve + * Fix stringheap list management failure. + * * Revision 1.1 2003/02/13 18:13:28 steve * Make lxt use stringheap to perm-allocate strings. * diff --git a/vpi/sys_lxt.c b/vpi/sys_lxt.c index 52d7e3c2a..945b90701 100644 --- a/vpi/sys_lxt.c +++ b/vpi/sys_lxt.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: sys_lxt.c,v 1.19 2003/04/27 02:22:27 steve Exp $" +#ident "$Id: sys_lxt.c,v 1.20 2003/04/28 01:03:11 steve Exp $" #endif # include "config.h" @@ -517,7 +517,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip) if (nexus_id) set_nexus_ident(nexus_id, ident); - + info = malloc(sizeof(*info)); info->time.type = vpiSimTime; @@ -793,6 +793,9 @@ void sys_lxt_register() /* * $Log: sys_lxt.c,v $ + * Revision 1.20 2003/04/28 01:03:11 steve + * Fix stringheap list management failure. + * * Revision 1.19 2003/04/27 02:22:27 steve * Capture VCD dump value in the rosync time period. * diff --git a/vpi/vcd_priv.c b/vpi/vcd_priv.c index 7d28e2a47..e946300a5 100644 --- a/vpi/vcd_priv.c +++ b/vpi/vcd_priv.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: vcd_priv.c,v 1.2 2003/02/13 18:13:28 steve Exp $" +#ident "$Id: vcd_priv.c,v 1.3 2003/04/28 01:03:11 steve Exp $" #endif # include "vcd_priv.h" @@ -131,7 +131,7 @@ static inline unsigned ihash(int nex) return a & 0xff; } -static struct vcd_id_s **vcd_ids; +static struct vcd_id_s **vcd_ids = 0; const char *find_nexus_ident(int nex) { @@ -169,6 +169,9 @@ void set_nexus_ident(int nex, const char *id) /* * $Log: vcd_priv.c,v $ + * Revision 1.3 2003/04/28 01:03:11 steve + * Fix stringheap list management failure. + * * Revision 1.2 2003/02/13 18:13:28 steve * Make lxt use stringheap to perm-allocate strings. *