- fixed opening bug on binary stl file
This commit is contained in:
parent
42da29417b
commit
ca7a42f881
|
@ -98,8 +98,9 @@ static bool LoadMask(const char * filename, int &mask)
|
|||
*/
|
||||
static bool IsSTLColored(const char * filename, bool &magicsMode)
|
||||
{
|
||||
if(IsSTLBinary(filename)==false) return false;
|
||||
FILE *fp = fopen(filename, "r");
|
||||
if(IsSTLBinary(filename)==false)
|
||||
return false;
|
||||
FILE *fp = fopen(filename, "rb");
|
||||
char buf[STL_LABEL_SIZE+1];
|
||||
fread(buf,sizeof(char),STL_LABEL_SIZE,fp);
|
||||
std::string strInput(buf);
|
||||
|
@ -122,7 +123,8 @@ static bool IsSTLColored(const char * filename, bool &magicsMode)
|
|||
fread(&attr,sizeof(unsigned short),1,fp);
|
||||
if(attr!=0)
|
||||
{
|
||||
if(Color4b::FromUnsignedR5G5B5(attr) != Color4b(Color4b::White)) return true;
|
||||
if(Color4b::FromUnsignedR5G5B5(attr) != Color4b(Color4b::White))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue