Skip to content

Commit

Permalink
Fixed TIM encoding.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostie314159 committed Dec 19, 2024
1 parent aa4e400 commit 03ba900
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/elements/tim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ impl<Bitmap: MeasureWith<()>> MeasureWith<()> for TIMElement<'_, Bitmap> {
2 + if let Some(ref bitmap) = self.bitmap {
bitmap.measure_with(ctx)
} else {
0
1
}
}
}
Expand All @@ -593,6 +593,8 @@ impl<Bitmap: TryIntoCtx<Error = scroll::Error>> TryIntoCtx for TIMElement<'_, Bi
buf.gwrite(self.dtim_period, &mut offset)?;
if let Some(bitmap) = self.bitmap {
buf.gwrite(bitmap, &mut offset)?;
} else {
offset += 1;
}

Ok(offset)
Expand Down

0 comments on commit 03ba900

Please sign in to comment.