Assert
This commit is contained in:
parent
8fd84dd4ff
commit
f7337084ad
1 changed files with 1 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ impl Iterator for ScanLineRanges {
|
|||
let bits_per_line = pixels_per_line * u32::from(self.bits_per_pixel);
|
||||
let bytes_per_line = ((bits_per_line + 7) / 8) as usize;
|
||||
let len = bytes_per_line + 1;
|
||||
assert!(self.left >= len);
|
||||
self.left -= len;
|
||||
Some((len, current_pass))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue