source: freewrt/tools/lzma/patches/patch-C_7zip_Compress_LZMA_LZMADecoder_cpp@ 601a699

freewrt_1_0 freewrt_2_0
Last change on this file since 601a699 was 9701b3d, checked in by Thorsten Glaser <tg@…>, 19 years ago

run update-patches, difficult cases (patched files into existence)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@435 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 963 bytes
Line 
1$FreeWRT$
2--- lzma-432.orig/C/7zip/Compress/LZMA/LZMADecoder.cpp Thu Sep 22 08:55:12 2005
3+++ lzma-432/C/7zip/Compress/LZMA/LZMADecoder.cpp Thu Jul 27 10:24:33 2006
4@@ -274,12 +274,17 @@ STDMETHODIMP CDecoder::SetDecoderPropert
5 Byte remainder = (Byte)(properties[0] / 9);
6 int lp = remainder % 5;
7 int pb = remainder / 5;
8- if (pb > NLength::kNumPosStatesBitsMax)
9- return E_INVALIDARG;
10- _posStateMask = (1 << pb) - 1;
11 UInt32 dictionarySize = 0;
12 for (int i = 0; i < 4; i++)
13 dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8);
14+ return SetDecoderPropertiesRaw(lc, lp, pb, dictionarySize);
15+}
16+
17+STDMETHODIMP CDecoder::SetDecoderPropertiesRaw(int lc, int lp, int pb, UInt32 dictionarySize)
18+{
19+ if (pb > NLength::kNumPosStatesBitsMax)
20+ return E_INVALIDARG;
21+ _posStateMask = (1 << pb) - 1;
22 if (!_outWindowStream.Create(dictionarySize))
23 return E_OUTOFMEMORY;
24 if (!_literalDecoder.Create(lp, lc))
Note: See TracBrowser for help on using the repository browser.