diff --git a/src/imageformats/dds.cpp b/src/imageformats/dds.cpp index 509689e..b1f6fc0 100644 --- a/src/imageformats/dds.cpp +++ b/src/imageformats/dds.cpp @@ -2602,7 +2602,7 @@ int QDDSHandler::imageCount() const if (!ensureScanned()) return 0; - return qMax(1, m_header.mipMapCount); + return qBound(1, m_header.mipMapCount, 32); } bool QDDSHandler::jumpToImage(int imageNumber)