mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 10: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:
@@ -32,8 +32,8 @@ static int AddUniqHash(const CStreamInfo *streams, CUIntVector &sorted, const By
|
||||
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 Byte *hash2 = streams[index].Hash;
|
||||
|
||||
unsigned i;
|
||||
@@ -124,9 +124,9 @@ static int AddToHardLinkList(const CObjectVector<CMetaItem> &metaItems, unsigned
|
||||
unsigned left = 0, right = indexes.Size();
|
||||
while (left != right)
|
||||
{
|
||||
unsigned mid = (left + right) / 2;
|
||||
unsigned index = indexes[mid];
|
||||
int comp = Compare_HardLink_MetaItems(mi, metaItems[index]);
|
||||
const unsigned mid = (unsigned)(((size_t)left + (size_t)right) / 2);
|
||||
const unsigned index = indexes[mid];
|
||||
const int comp = Compare_HardLink_MetaItems(mi, metaItems[index]);
|
||||
if (comp == 0)
|
||||
return index;
|
||||
if (comp < 0)
|
||||
@@ -203,8 +203,8 @@ bool CDir::FindDir(const CObjectVector<CMetaItem> &items, const UString &name, u
|
||||
unsigned left = 0, right = Dirs.Size();
|
||||
while (left != right)
|
||||
{
|
||||
unsigned mid = (left + right) / 2;
|
||||
int comp = CompareFileNames(name, items[Dirs[mid].MetaIndex].Name);
|
||||
const unsigned mid = (unsigned)(((size_t)left + (size_t)right) / 2);
|
||||
const int comp = CompareFileNames(name, items[Dirs[mid].MetaIndex].Name);
|
||||
if (comp == 0)
|
||||
{
|
||||
index = mid;
|
||||
|
||||
Reference in New Issue
Block a user