Fixed: Decoder::expand_strip might not read the full strip

This commit is contained in:
zroug committed 2018-08-27 23:05:16 +02:00
1 parent 583b241cef
commit 724e5e8c80
1 file changed
+2 -1
+2 -1
View File
@@ -422,7 +422,8 @@ impl<R: Read + Seek> Decoder<R> {
(ColorType:: RGB(8), DecodingBuffer::U8(ref mut buffer)) |
(ColorType::RGBA(8), DecodingBuffer::U8(ref mut buffer)) |
(ColorType::CMYK(8), DecodingBuffer::U8(ref mut buffer)) => {
try!(reader.read(&mut buffer[..bytes]))
try!(reader.read_exact(&mut buffer[..bytes]));
bytes
}
(ColorType::RGBA(16), DecodingBuffer::U16(ref mut buffer)) |
(ColorType:: RGB(16), DecodingBuffer::U16(ref mut buffer)) => {