Merge pull request #41 from birktj/fix-bugs

Fix divide by zero bug
This commit is contained in:
Birk Tjelmeland authored and GitHub committed 2019-04-25 22:30:31 +02:00
commit 48f16f5206
51 files changed
+15 -2

No files matched your search

+4
View File
@@ -613,6 +613,10 @@ impl<R: Read + Seek> Decoder<R> {
.get_tag_u32(ifd::Tag::RowsPerStrip)
.unwrap_or(self.height);
if rows_per_strip == 0 {
return Ok(0);
}
Ok((self.height + rows_per_strip - 1) / rows_per_strip)
}