mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 12:11:34 -06:00
Update to 7-Zip Version 22.00
See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/9c2d9061ce/
This commit is contained in:
@@ -11,10 +11,10 @@ unsigned CUniqBlocks::AddUniq(const Byte *data, size_t size)
|
||||
unsigned left = 0, right = Sorted.Size();
|
||||
while (left != right)
|
||||
{
|
||||
unsigned mid = (left + right) / 2;
|
||||
unsigned index = Sorted[mid];
|
||||
const unsigned mid = (unsigned)(((size_t)left + (size_t)right) / 2);
|
||||
const unsigned index = Sorted[mid];
|
||||
const CByteBuffer &buf = Bufs[index];
|
||||
size_t sizeMid = buf.Size();
|
||||
const size_t sizeMid = buf.Size();
|
||||
if (size < sizeMid)
|
||||
right = mid;
|
||||
else if (size > sizeMid)
|
||||
@@ -23,7 +23,7 @@ unsigned CUniqBlocks::AddUniq(const Byte *data, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return index;
|
||||
int cmp = memcmp(data, buf, size);
|
||||
const int cmp = memcmp(data, buf, size);
|
||||
if (cmp == 0)
|
||||
return index;
|
||||
if (cmp < 0)
|
||||
|
||||
Reference in New Issue
Block a user