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/Archive/Lzh/LzhIn.cpp')
-rwxr-xr-x7zip/Archive/Lzh/LzhIn.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/7zip/Archive/Lzh/LzhIn.cpp b/7zip/Archive/Lzh/LzhIn.cpp
index 5344ef13..42ef50e4 100755
--- a/7zip/Archive/Lzh/LzhIn.cpp
+++ b/7zip/Archive/Lzh/LzhIn.cpp
@@ -66,9 +66,9 @@ static const Byte *ReadString(const Byte *p, size_t size, AString &s)
static Byte CalcSum(const Byte *data, size_t size)
{
Byte sum = 0;
- for (size_t i = 0; i < size; i++)
- sum += data[i];
- return sum;
+ for (size_t i = 0; i < size; i++)
+ sum = (Byte)(sum + data[i]);
+ return sum;
}
HRESULT CInArchive::GetNextItem(bool &filled, CItemEx &item)