From 3212f08dece3677f4f69b59dc5c5639d0f12525c Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 9 Feb 2018 08:03:07 +0400 Subject: [PATCH] (WARC): workaround for old archives. --- ArcFormats/ShiinaRio/WarcEncryption.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/ShiinaRio/WarcEncryption.cs b/ArcFormats/ShiinaRio/WarcEncryption.cs index 75b41240..2d03ab9e 100644 --- a/ArcFormats/ShiinaRio/WarcEncryption.cs +++ b/ArcFormats/ShiinaRio/WarcEncryption.cs @@ -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));