From 6befc46a596641f2eb5ae47415022177957da16f Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 29 Oct 2009 17:20:13 +0000 Subject: [PATCH] corrected a bug that i introduced when i templated these functions --- wrap/ply/plystuff.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrap/ply/plystuff.h b/wrap/ply/plystuff.h index c2b74cb4..3e41e631 100644 --- a/wrap/ply/plystuff.h +++ b/wrap/ply/plystuff.h @@ -184,6 +184,7 @@ template (fname2==0 || CheckCacheTime(fname2,d)) ) { // Lettura bbox e controllo + Box3d readBB; FILE * fp = fopen(d,"rb"); if(fp==0) return false; if( fread(h,1,8,fp)!=8 ) @@ -191,12 +192,13 @@ template fclose(fp); return false; } - if( fread(&box,sizeof(Box3d),1,fp)!=1 ) + if( fread(&readBB,sizeof(Box3d),1,fp)!=1 ) { fclose(fp); return false; } fclose(fp); + box.Import(readBB); if( strncmp(h,bboxheader,8) ) return false; else