diff --git a/src/fo4/file.rs b/src/fo4/file.rs index 7483603..916e7fb 100644 --- a/src/fo4/file.rs +++ b/src/fo4/file.rs @@ -641,8 +641,12 @@ impl<'bytes> File<'bytes> { size = image.slice_pitch; } + if v.len() == 3 { + break; + } + stop += 1; - if stop == images_len.get() || v.len() == 3 { + if stop == images_len.get() { break; } }