Merge pull request #166 from antonioneves/master

Close opened files when reading an STL file.
This commit is contained in:
Alessandro Muntoni 2021-03-25 14:33:28 +01:00 committed by GitHub
commit c275c8fa87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,7 @@ static bool IsSTLColored(const char * filename, bool &coloredFlag, bool &magicsM
}
}
fclose(fp);
return true;
}
@ -163,6 +164,7 @@ static bool IsSTLBinary(const char * filename, bool &binaryFlag)
if(file_size == expected_file_size)
{
binaryFlag = true;
fclose(fp);
return true;
}