diff --git a/crates/exr/src/zlib.rs b/crates/exr/src/zlib.rs index 8959a7e89..a38bd0b46 100644 --- a/crates/exr/src/zlib.rs +++ b/crates/exr/src/zlib.rs @@ -501,9 +501,8 @@ mod tests { } let mut sorted: Vec = (0..lens.len()).filter(|&s| lens[s] > 0).collect(); sorted.sort_by_key(|&s| (lens[s], s)); - for len in 1..16 { + for &c in count.iter().skip(1) { code |= bit(pos)? as i32; - let c = count[len]; if code - c < first { return sorted.get((index + code - first) as usize).copied(); }