diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2015-10-18 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:56 +0300 |
commit | a663a6deb7a150f935fac7efdbf4d53d27369594 (patch) | |
tree | d1be306b33dd96050206da5774fff7bd9083ddfa /CPP/7zip/Compress | |
parent | 6543c280208393fa32cb0094f770d14c1cfb13b2 (diff) |
15.0915.09
Diffstat (limited to 'CPP/7zip/Compress')
-rw-r--r-- | CPP/7zip/Compress/Lzma2Encoder.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/CPP/7zip/Compress/Lzma2Encoder.cpp b/CPP/7zip/Compress/Lzma2Encoder.cpp index dea297c4..06a11f10 100644 --- a/CPP/7zip/Compress/Lzma2Encoder.cpp +++ b/CPP/7zip/Compress/Lzma2Encoder.cpp @@ -38,7 +38,20 @@ HRESULT SetLzma2Prop(PROPID propID, const PROPVARIANT &prop, CLzma2EncProps &lzm switch (propID) { case NCoderPropID::kBlockSize: - if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.blockSize = prop.ulVal; break; + { + if (prop.vt == VT_UI4) + lzma2Props.blockSize = prop.ulVal; + else if (prop.vt == VT_UI8) + { + size_t v = (size_t)prop.uhVal.QuadPart; + if (v != prop.uhVal.QuadPart) + return E_INVALIDARG; + lzma2Props.blockSize = v; + } + else + return E_INVALIDARG; + break; + } case NCoderPropID::kNumThreads: if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.numTotalThreads = (int)(prop.ulVal); break; default: |