solved crash for stl meshes > 2GB

This commit is contained in:
alemuntoni 2020-11-16 09:54:18 +01:00
parent 527953434d
commit 6228d92fec
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ static bool IsSTLBinary(const char * filename, bool &binaryFlag)
fseek(fp, STL_LABEL_SIZE, SEEK_SET);
fread(&facenum, sizeof(unsigned int), 1, fp);
int expected_file_size=STL_LABEL_SIZE + 4 + (sizeof(short)+sizeof(STLFacet) )*facenum ;
long expected_file_size=STL_LABEL_SIZE + 4 + (sizeof(short)+sizeof(STLFacet) )*facenum ;
if(file_size == expected_file_size)
{
binaryFlag = true;