diff --git a/src/librawspeed/decoders/DngDecoder.cpp b/src/librawspeed/decoders/DngDecoder.cpp index 6ea577884..dc3aae29a 100644 --- a/src/librawspeed/decoders/DngDecoder.cpp +++ b/src/librawspeed/decoders/DngDecoder.cpp @@ -334,7 +334,7 @@ DngDecoder::getTilingDescription(const TiffIFD* raw) const { ? raw->getEntry(TiffTag::ROWSPERSTRIP)->getU32() : mRaw->dim.y; - if (yPerSlice == 0 || yPerSlice > static_cast(mRaw->dim.y) || + if (yPerSlice == 0 || roundUpDivision(mRaw->dim.y, yPerSlice) != counts->count) { ThrowRDE("Invalid y per slice %u or strip count %u (height = %u)", yPerSlice, counts->count, mRaw->dim.y);