From bfed66e077a4bcf7fb586f048b9cc5a70ac1582e Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 31 Jul 2016 18:54:58 +0400 Subject: [PATCH] (AImageReader): header could be of less than 8 elements length. --- ArcFormats/Cyberworks/ImageTINK.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArcFormats/Cyberworks/ImageTINK.cs b/ArcFormats/Cyberworks/ImageTINK.cs index 5962da76..a64085fc 100644 --- a/ArcFormats/Cyberworks/ImageTINK.cs +++ b/ArcFormats/Cyberworks/ImageTINK.cs @@ -60,7 +60,8 @@ namespace GameRes.Formats.Cyberworks public void Unpack () { - var header = new int[m_scheme.HeaderOrder.Length]; + int header_length = Math.Max (8, m_scheme.HeaderOrder.Length); + var header = new int[header_length]; for (int i = 0; i < m_scheme.HeaderOrder.Length; ++i) { int b = GetInt();