From 92647dd6ffcac9f00857b07afff28e652dead97f Mon Sep 17 00:00:00 2001 From: Nigel Ihza Firdausy <106657905+Ni-zav@users.noreply.github.com> Date: Wed, 14 Oct 2026 23:18:25 +0700 Subject: [PATCH] fix(svg): cast channel count for pixel budget arithmetic --- crates/io/src/svg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/io/src/svg.rs b/crates/io/src/svg.rs index cc858a0694..11d80ed92b 100644 --- a/crates/io/src/svg.rs +++ b/crates/io/src/svg.rs @@ -331,7 +331,7 @@ impl Conv { } fn charge_pixels(&mut self, w: usize, h: usize) -> bool { - let bytes = (w as u64).saturating_mul(h as u64).saturating_mul(u64::from(self.fmt.channels()) * 4); + let bytes = (w as u64).saturating_mul(h as u64).saturating_mul(self.fmt.channels() as u64 * 4); match self.pixel_budget.checked_sub(bytes) { Some(remaining) => { self.pixel_budget = remaining;