diff --git a/src/imageformats/pcx.cpp b/src/imageformats/pcx.cpp index be12c8f..6d47cf9 100644 --- a/src/imageformats/pcx.cpp +++ b/src/imageformats/pcx.cpp @@ -308,7 +308,7 @@ static bool readImage4(QImage &img, QDataStream &s, const PCXHEADER &header) return false; } - if (header.BytesPerLine < (header.width() / 8)) { + if (header.BytesPerLine < (header.width() + 7) / 8) { qWarning() << "PCX image has invalid BytesPerLine value"; return false; }