winemenubuilder: Avoid warning about uninitialized value (clang).
This commit is contained in:
parent
9f7c390ec8
commit
c2705081ac
|
@ -1012,8 +1012,7 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
|
||||||
|
|
||||||
for (i = 0; i < numEntries; i++)
|
for (i = 0; i < numEntries; i++)
|
||||||
{
|
{
|
||||||
int bestIndex;
|
int bestIndex = i;
|
||||||
int maxBits = -1;
|
|
||||||
int j;
|
int j;
|
||||||
BOOLEAN duplicate = FALSE;
|
BOOLEAN duplicate = FALSE;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
@ -1034,14 +1033,13 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
|
||||||
}
|
}
|
||||||
if (duplicate)
|
if (duplicate)
|
||||||
continue;
|
continue;
|
||||||
for (j = i; j < numEntries; j++)
|
for (j = i + 1; j < numEntries; j++)
|
||||||
{
|
{
|
||||||
if (iconDirEntries[j].bWidth == iconDirEntries[i].bWidth &&
|
if (iconDirEntries[j].bWidth == iconDirEntries[i].bWidth &&
|
||||||
iconDirEntries[j].bHeight == iconDirEntries[i].bHeight &&
|
iconDirEntries[j].bHeight == iconDirEntries[i].bHeight &&
|
||||||
iconDirEntries[j].wBitCount >= maxBits)
|
iconDirEntries[j].wBitCount >= iconDirEntries[bestIndex].wBitCount)
|
||||||
{
|
{
|
||||||
bestIndex = j;
|
bestIndex = j;
|
||||||
maxBits = iconDirEntries[j].wBitCount;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WINE_TRACE("Selected: %d\n", bestIndex);
|
WINE_TRACE("Selected: %d\n", bestIndex);
|
||||||
|
|
Loading…
Reference in New Issue