(WARC): workaround for old archives.

This commit is contained in:
morkt 2018-02-09 08:03:07 +04:00
parent 098644ff29
commit 3212f08dec

View File

@ -148,7 +148,7 @@ namespace GameRes.Formats.ShiinaRio
{
a = (sbyte)data[index] ^ (sbyte)data_length;
b = (sbyte)data[index+1] ^ (sbyte)(data_length / 2);
if (data_length != MaxIndexLength)
if (data_length != MaxIndexLength && (WarcVersion > 130 || m_scheme.Version > 2150))
{
// ... regular entry decryption
int idx = (int)((double)NextRand() * (m_scheme.ShiinaImage.Length / 4294967296.0));