diff col.cc @ 138:993d5f7e5f30

collision malloc error after face reading
author e085768
date Fri, 22 Jul 2011 23:51:14 +0900
parents 4f50f5a3b363
children dbf8858aceed
line wrap: on
line diff
--- a/col.cc	Fri Jul 22 18:43:45 2011 +0900
+++ b/col.cc	Fri Jul 22 23:51:14 2011 +0900
@@ -130,7 +130,8 @@
 
   malloc_align16(&hd->free_addr, &colface, sizeof(ColFace)*face->pp_num);
 
-  hd->facenum = face->pp_num;
+  hd->facenum = face->size/3;
+  
 
   for (i=0; i < hd->facenum; i++) {
     memcpy(colface[i].p0, &face->pp->tri[i].ver1, sizeof(FVECTOR));