forge
Explore
Log in

Don't you dare go Hollow

ec-ogg test: damage comment matches the three-quarter offset (first audio page is not the one damaged)

Browse files at this commit

397395d3756c9481ea1e9155e26b47f314f0cf3eAhmet Kaan GümüşParent: c8c31df
crates/ec-ogg/tests/ogg.rsmodified+3 -2
@@ -341,8 +341,9 @@ fn damage_costs_one_page_and_no_more() {
341341 let (_, clean, _) = demux_all(path);
342342 let bytes = std::fs::read(path).unwrap();
343343
344- // Flip a bit in the middle of the file: that lands inside a page body, so
345- // the page's checksum fails and its packets are lost — and nothing else is.
344+ // Flip a bit three quarters in: past the header pages and inside an audio
345+ // page with audio on both sides, so the page's checksum fails and its
346+ // packets are lost — and nothing else is.
346347 let mut damaged = bytes.clone();
347348 let at = damaged.len() * 3 / 4;
348349 damaged[at] ^= 0x40;