(InputCryptoStream): new class derived from CryptoStream.

properly dispose transformations used by CryptoStream.
This commit is contained in:
morkt
2016-12-25 06:51:33 +04:00
parent a303a66501
commit b6f472ab25
14 changed files with 42 additions and 18 deletions

View File

@@ -162,7 +162,7 @@ namespace GameRes.Formats.Tactics
{
// NOTE CryptoStream will close an input stream
using (var proxy = new InputProxyStream (input, true))
using (var xored = new CryptoStream (proxy, new NotTransform(), CryptoStreamMode.Read))
using (var xored = new InputCryptoStream (proxy, new NotTransform()))
using (var lzss = new LzssStream (xored))
if (m_index.Length != lzss.Read (m_index, 0, m_index.Length))
return false;