Merge pull request #293 from 1c3t3a/fix-byte-metadata-array

Fix type mismatch for reading Lists of Bytes
This commit is contained in:
Aurelia Molzer authored and GitHub committed 2025-08-30 21:33:48 +00:00
commit 8cc6bc657d
1 file changed
+2 -2
+2 -2
View File
@@ -577,10 +577,10 @@ impl Entry {
Type::BYTE => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| { Type::BYTE => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| {
let mut buf = [0; 1]; let mut buf = [0; 1];
reader.inner().read_exact(&mut buf)?; reader.inner().read_exact(&mut buf)?;
Ok(UnsignedBig(u64::from(buf[0]))) Ok(Byte(buf[0]))
}), }),
Type::SBYTE => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| { Type::SBYTE => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| {
Ok(SignedBig(i64::from(reader.read_i8()?))) Ok(SignedByte(reader.read_i8()?))
}), }),
Type::SHORT => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| { Type::SHORT => self.decode_offset(self.count, bo, bigtiff, limits, reader, |reader| {
Ok(Short(reader.read_u16()?)) Ok(Short(reader.read_u16()?))