mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 11:14:58 -06:00
16.04
This commit is contained in:
committed by
Kornel Lesiński
parent
232ce79574
commit
603abd5528
@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 << 20;
|
||||
static const UInt32 kWindowReservSize = (1 << 22) + 256;
|
||||
|
||||
CDecoder::CDecoder():
|
||||
m_IsSolid(false)
|
||||
m_IsSolid(false),
|
||||
m_TablesOK(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -100,6 +101,8 @@ UInt32 CDecoder::ReadBits(unsigned numBits) { return m_InBitStream.ReadBits(numB
|
||||
|
||||
bool CDecoder::ReadTables(void)
|
||||
{
|
||||
m_TablesOK = false;
|
||||
|
||||
Byte levelLevels[kLevelTableSize];
|
||||
Byte newLevels[kMaxTableSize];
|
||||
m_AudioMode = (ReadBits(1) == 1);
|
||||
@@ -170,6 +173,9 @@ bool CDecoder::ReadTables(void)
|
||||
}
|
||||
|
||||
memcpy(m_LastLevels, newLevels, kMaxTableSize);
|
||||
|
||||
m_TablesOK = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -340,10 +346,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
|
||||
return S_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
if (!ReadTables())
|
||||
return S_FALSE;
|
||||
ReadTables();
|
||||
}
|
||||
|
||||
if (!m_TablesOK)
|
||||
return S_FALSE;
|
||||
|
||||
UInt64 startPos = m_OutWindowStream.GetProcessedSize();
|
||||
while (pos < unPackSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user