Skip to content

Commit

Permalink
Loop counter should be the same type as the count type. (#987)
Browse files Browse the repository at this point in the history
It is unlikely that somebody selects more than 0xffff files but just in case, don't loop forever.
  • Loading branch information
sredna authored Sep 27, 2021
1 parent acbbd15 commit 05b8aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ShellExtension/ShellExtension/WinMergeShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ HRESULT CWinMergeShell::Initialize(LPCITEMIDLIST pidlFolder,
hr = S_OK;

// Get all file names.
for (WORD x = 0 ; x < uNumFilesDropped; x++)
for (UINT x = 0 ; x < uNumFilesDropped; x++)
{
// Get the number of bytes required by the file's full pathname
UINT wPathnameSize = DragQueryFile(hDropInfo, x, NULL, 0);
Expand Down

0 comments on commit 05b8aeb

Please sign in to comment.