diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-11-29 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-11-30 15:27:15 +0500 |
commit | e5431fa6f5505e385c6f9367260717e9c47dc2ee (patch) | |
tree | 4cd2c2c3b225b48c8e7053432c41d7b6b6a3d5f8 /CPP/7zip/Common/MethodProps.h | |
parent | e008ce3976c087bfd21344af8f00a23cf69d4174 (diff) | |
download | 7zip-main.tar.gz 7zip-main.tar.bz2 7zip-main.zip |
Diffstat (limited to '')
-rw-r--r-- | CPP/7zip/Common/MethodProps.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CPP/7zip/Common/MethodProps.h b/CPP/7zip/Common/MethodProps.h index 3c332d6..a52f4bc 100644 --- a/CPP/7zip/Common/MethodProps.h +++ b/CPP/7zip/Common/MethodProps.h | |||
@@ -125,7 +125,7 @@ public: | |||
125 | 125 | ||
126 | UInt32 Get_Lzma_Algo() const | 126 | UInt32 Get_Lzma_Algo() const |
127 | { | 127 | { |
128 | int i = FindProp(NCoderPropID::kAlgorithm); | 128 | const int i = FindProp(NCoderPropID::kAlgorithm); |
129 | if (i >= 0) | 129 | if (i >= 0) |
130 | { | 130 | { |
131 | const NWindows::NCOM::CPropVariant &val = Props[(unsigned)i].Value; | 131 | const NWindows::NCOM::CPropVariant &val = Props[(unsigned)i].Value; |
@@ -141,11 +141,11 @@ public: | |||
141 | if (Get_DicSize(v)) | 141 | if (Get_DicSize(v)) |
142 | return v; | 142 | return v; |
143 | const unsigned level = GetLevel(); | 143 | const unsigned level = GetLevel(); |
144 | const UInt32 dictSize = | 144 | const UInt32 dictSize = level <= 4 ? |
145 | ( level <= 3 ? ((UInt32)1 << (level * 2 + 16)) : | 145 | (UInt32)1 << (level * 2 + 16) : |
146 | ( level <= 6 ? ((UInt32)1 << (level + 19)) : | 146 | level <= sizeof(size_t) / 2 + 4 ? |
147 | ( level <= 7 ? ((UInt32)1 << 25) : ((UInt32)1 << 26) | 147 | (UInt32)1 << (level + 20) : |
148 | ))); | 148 | (UInt32)1 << (sizeof(size_t) / 2 + 24); |
149 | return dictSize; | 149 | return dictSize; |
150 | } | 150 | } |
151 | 151 | ||