Skip to content

Commit

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

Ok(offset)
Expand Down

0 comments on commit 0fbcc77

Please sign in to comment.