From 85e0f8a328268600e747b80d471865614f847b32 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 10 Jan 2010 15:01:51 -0800 Subject: [PATCH] Fix major error in lxt2 info allocation. The zero element was already returned so it can not be reused a second time. This was crashing when things went off the end of the list since the do all functor was off by one. --- vpi/sys_lxt2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpi/sys_lxt2.c b/vpi/sys_lxt2.c index 5845943d4..14e90a2ec 100644 --- a/vpi/sys_lxt2.c +++ b/vpi/sys_lxt2.c @@ -76,8 +76,8 @@ struct vcd_info*new_vcd_info(void) return info_chunk_list->data + 0; } - struct vcd_info*ptr = cur_chunk->data + cur_chunk->chunk_fill; cur_chunk->chunk_fill += 1; + struct vcd_info*ptr = cur_chunk->data + cur_chunk->chunk_fill; return ptr; }