From a5e543120d541f47fe0a2e9841d02151dd3e693a Mon Sep 17 00:00:00 2001
From: mihaf <miha.fosnaric@gmail.com>
Date: Tue, 08 Jul 2014 12:27:15 +0000
Subject: [PATCH] Fix: the number of cell total must be updated from new tape aswell.

---
 src/io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/io.c b/src/io.c
index ead2a7e..898b47b 100644
--- a/src/io.c
+++ b/src/io.c
@@ -426,6 +426,7 @@
     vesicle->clist->ncmax[0]=vesicle->tape->ncxmax; 
     vesicle->clist->ncmax[1]=vesicle->tape->ncymax; 
     vesicle->clist->ncmax[2]=vesicle->tape->nczmax; 
+	vesicle->clist->cellno=vesicle->clist->ncmax[0]*vesicle->clist->ncmax[1]*vesicle->clist->ncmax[2];
 	vesicle->clist->cell=(ts_cell **)malloc(sizeof(ts_cell *)*vesicle->clist->ncmax[0]*vesicle->clist->ncmax[1]*vesicle->clist->ncmax[2]);
 	for(i=0;i<vesicle->clist->ncmax[0]*vesicle->clist->ncmax[1]*vesicle->clist->ncmax[2];i++){
         	vesicle->clist->cell[i]=(ts_cell *)calloc(1,sizeof(ts_cell));

--
Gitblit v1.9.3