From 6a34f13808e0caae6709f97556ab3b13b18752ca Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 31 Oct 2026 00:54:52 -0400 Subject: [PATCH] Ogg: the budget-spent warning goes last, after the capped warnings Co-Authored-By: Claude Opus 5.5 --- crates/ogg/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ogg/src/lib.rs b/crates/ogg/src/lib.rs index b009f042..77c081d5 100644 --- a/crates/ogg/src/lib.rs +++ b/crates/ogg/src/lib.rs @@ -350,13 +350,13 @@ pub fn open(src: &(impl ByteSource + ?Sized)) -> Result { if !found_any { return Err(Error::NotOgg); } - if scanner.spent() { - // once per file, so it is not subject to the cap on the others - warnings.push("recovery budget spent; the rest of the damaged data was not searched".into()); - } if !partial.is_empty() { warn(&mut warnings, "file ends inside a packet".into()); } + if scanner.spent() { + // once per file and last, so it is not subject to the cap on the others + warnings.push("recovery budget spent; the rest of the damaged data was not searched".into()); + } Ok(OggFile { streams, warnings }) }