#3830: stop collecting a .3dl line's numbers past the mesh limit

This commit is contained in:
arnav-hiwarkar committed 2026-11-17 22:20:14 +05:30
1 parent a65a1f746f
commit 6232bed556
1 file changed
+1 -1
+1 -1
View File
@@ -68,7 +68,7 @@ pub fn parse_3dl(text: &str) -> Option<Lut> {
}
continue;
}
let v: Vec<f64> = l.split_whitespace().filter_map(|t| t.parse().ok()).collect();
let v: Vec<f64> = l.split_whitespace().filter_map(|t| t.parse().ok()).take(MAX_LATTICE + 1).collect();
if v.len() > 3 && mesh.is_none() && rows.is_empty() {
// The mesh length is the lattice side: refuse one no lattice reader accepts (#3830).
if v.len() > MAX_LATTICE {