(AImageReader): header could be of less than 8 elements length.

This commit is contained in:
morkt 2016-07-31 18:54:58 +04:00
parent fe8d9cadb5
commit bfed66e077

View File

@ -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();