From 17e8c7efca2b7239561d002f20f48791b2b48b1f Mon Sep 17 00:00:00 2001 From: morkt Date: Mon, 24 Oct 2016 04:58:18 +0400 Subject: [PATCH] (AImageReader): slight fault tolerance. --- ArcFormats/Cyberworks/ImageTINK.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/Cyberworks/ImageTINK.cs b/ArcFormats/Cyberworks/ImageTINK.cs index a64085fc..57ddb644 100644 --- a/ArcFormats/Cyberworks/ImageTINK.cs +++ b/ArcFormats/Cyberworks/ImageTINK.cs @@ -210,7 +210,7 @@ namespace GameRes.Formats.Cyberworks if (has_alpha || (bit & rgb_map[bit_src]) != 0) { m_input.Read (m_output, dst, 3); - if (has_alpha) + if (has_alpha && alpha_src < alpha.Length) { m_output[dst+3] = alpha[alpha_src]; alpha_src += 3;