This commit is contained in:
mehbark 2025-10-02 19:54:34 -04:00
parent 05f3711bcf
commit 256fad24fc
Signed by: mbk
GPG key ID: E333EC1335FFCCDB

View file

@ -28,7 +28,7 @@ impl Iterator for Encoder<'_> {
.take(256) .take(256)
.enumerate() .enumerate()
.find(|&(_i, c)| c != byte) .find(|&(_i, c)| c != byte)
.unwrap_or((self.src.len(), 0)); .unwrap_or((255.min(self.src.len()), 0));
self.src = &self.src[count..]; self.src = &self.src[count..];