Fixing mipmap bug introduced from a fuzz test fix

This commit is contained in:
Rich Geldreich
2019-05-09 17:57:14 -07:00
parent 3347b17393
commit 85f4651def

View File

@@ -4125,17 +4125,12 @@ namespace basist
if (pHeader->m_flags & cBASISHeaderFlagHasAlphaSlices)
{
if (pHeader->m_total_slices != pHeader->m_total_images * 2)
if (pHeader->m_total_slices & 1)
{
BASISU_DEVEL_ERROR("basisu_transcoder::get_total_images: invalid alpha basis file\n");
return false;
}
}
else if (pHeader->m_total_slices != pHeader->m_total_images)
{
BASISU_DEVEL_ERROR("basisu_transcoder::get_total_images: invalid total_images field in header\n");
return false;
}
if ((pHeader->m_flags & cBASISHeaderFlagETC1S) == 0)
{