From ec91662b4a5b753c13f7c19ea52f2fa8f682ad5a Mon Sep 17 00:00:00 2001 From: ds5678 <49847914+ds5678@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:50:31 -0700 Subject: [PATCH] Fix DecodeASTC method not using size of TOutputColor --- AssetRipper.TextureDecoder/Astc/AstcDecoder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AssetRipper.TextureDecoder/Astc/AstcDecoder.cs b/AssetRipper.TextureDecoder/Astc/AstcDecoder.cs index 866ca5b..c9f04c1 100644 --- a/AssetRipper.TextureDecoder/Astc/AstcDecoder.cs +++ b/AssetRipper.TextureDecoder/Astc/AstcDecoder.cs @@ -18,7 +18,7 @@ namespace AssetRipper.TextureDecoder.Astc where TOutputChannelValue : unmanaged where TOutputColor : unmanaged, IColor { - output = new byte[width * height * 4]; + output = new byte[width * height * Unsafe.SizeOf()]; return DecodeASTC(input, width, height, blockWidth, blockHeight, output); }