corrected a bug that i introduced when i templated these functions

This commit is contained in:
Paolo Cignoni 2009-10-29 17:20:13 +00:00
parent 6247e5efdc
commit 6befc46a59
1 changed files with 3 additions and 1 deletions

View File

@ -184,6 +184,7 @@ template<class ScalarType>
(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<class ScalarType>
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