Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/Compress/LZMA_Alone/LzmaRam.cpp')
-rwxr-xr-x7zip/Compress/LZMA_Alone/LzmaRam.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/7zip/Compress/LZMA_Alone/LzmaRam.cpp b/7zip/Compress/LZMA_Alone/LzmaRam.cpp
index 090d73d8..eb66211a 100755
--- a/7zip/Compress/LZMA_Alone/LzmaRam.cpp
+++ b/7zip/Compress/LZMA_Alone/LzmaRam.cpp
@@ -31,9 +31,8 @@ public:
STDMETHODIMP CInStreamRam::Read(void *data, UInt32 size, UInt32 *processedSize)
{
- UInt32 remain = Size - Pos;
- if (size > remain)
- size = remain;
+ if (size > (Size - Pos))
+ size = (UInt32)(Size - Pos);
for (UInt32 i = 0; i < size; i++)
((Byte *)data)[i] = Data[Pos + i];
Pos += size;
@@ -176,7 +175,7 @@ int LzmaRamEncode(
x86_Convert(filteredStream, (UInt32)inSize, 0, &_prevMask, &_prevPos, 1);
}
- UInt32 minSize = 0;
+ size_t minSize = 0;
int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1;
bool bestIsFiltered = false;
int mainResult = 0;