diff options
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r-- | evc/src/block.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/evc/src/block.rs b/evc/src/block.rs index 69cc460..d0f940b 100644 --- a/evc/src/block.rs +++ b/evc/src/block.rs @@ -59,7 +59,8 @@ impl Block { } pub fn read(source: &mut impl std::io::Read, size: Vec2<isize>) -> anyhow::Result<Self> { - Ok(match source.get::<u8>()? { + let variant = source.get::<u8>()?; + Ok(match variant { 0 => Block::Literal(Vec::read_const_size(source, size.area() as usize)?), 1 => Block::CompressedLiteral(Vec::read(source)?), 2 => Block::Split(Box::new({ |