1
0
Fork 0
forked from wry/wry

utils: fix rects_to_bands

This commit is contained in:
Julian Orth 2022-11-13 22:49:19 +01:00
parent 13bcdecd1b
commit 82a62e3fd9

View file

@ -393,11 +393,11 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container {
let mut res = Container::new();
for &[y1, y2] in ys.array_windows_ext::<2>() {
'bands: {
loop {
macro_rules! check_rect {
($rect:expr) => {{
if $rect.y1 != y1 {
break 'bands;
break;
}
rects.pop();
if y2 < $rect.y2 {
@ -422,6 +422,7 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container {
}
res.push(RectRaw { x1, x2, y1, y2 });
}
break;
}
}