Fix error case

This commit is contained in:
ruffson committed 2020-09-26 18:45:58 +02:00
1 parent d00ab0cc61
commit 6281360f10
1 file changed
+3 -3
+3 -3
View File
@@ -950,9 +950,9 @@ impl<R: Read + Seek> Decoder<R> {
)));
}
if offsets.len() != bytes.len() {
return Err(TiffError::FormatError(TiffFormatError::Format(
String::from("Size mismatch of StripOffsets and StripByteCounts"),
)));
return Err(TiffError::FormatError(
TiffFormatError::InconsistentSizesEncountered,
));
}
let mut res_img = Vec::with_capacity(offsets[0] as usize);