fixed flag reading bug

This commit is contained in:
Anakin 2017-01-21 17:16:44 +01:00
parent 6fa81a8ccc
commit a948590255

View File

@ -272,7 +272,7 @@ void MshFile::analyseMatdChunks(std::list<ChunkHeader*>& chunkList)
// 7: specular
for (unsigned int i = 0; i < 8; i++)
m_materials->back().flags[i] = (flag << (7 - i)) >> 7;
m_materials->back().flags[i] = (std::uint8_t)(flag << (7 - i)) >> 7;
m_materials->back().transparent = m_materials->back().flags[2] || m_materials->back().flags[3] || m_materials->back().flags[4] || m_materials->back().flags[6];