From f1a27fd9801c0e7f4d8d4d774f482aa25bcf9014 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Mon, 1 Feb 2021 22:48:01 +1100 Subject: [PATCH] Tweak std/png's swizzle_low_bit_depth scratch use --- std/png/decode_png.wuffs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/std/png/decode_png.wuffs b/std/png/decode_png.wuffs index a828af5d..f967b686 100644 --- a/std/png/decode_png.wuffs +++ b/std/png/decode_png.wuffs @@ -827,9 +827,8 @@ pri func decoder.swizzle_low_bit_depth!(dst: slice base.u8, dst_palette: slice b this.swizzler.swizzle_interleaved_from_slice!( dst: args.dst, dst_palette: args.dst_palette, - src: this.scratch[..]) + src: this.scratch[.. 1024]) - // TODO: replace 1024 with this.scratch.length(). n = 1024 * args.dst_bytes_per_pixel if n < args.dst.length() { args.dst = args.dst[n ..]