https://git.reactos.org/?p=reactos.git;a=commitdiff;h=34066e475a12563d17c75892c8c9d12754c8f8a1

commit 34066e475a12563d17c75892c8c9d12754c8f8a1
Author:     Whindmar Saksit <whinds...@proton.me>
AuthorDate: Tue Oct 3 10:43:44 2023 +0200
Commit:     GitHub <nore...@github.com>
CommitDate: Tue Oct 3 10:43:44 2023 +0200

    GetDetailsOf does not support column flags (#5755)
    
    GetDetailsOf does not support the column flags used by CompareIDs.
    As a side effect, also fixes LPARAM to UINT truncation on 64-bit.
---
 dll/win32/shell32/shlfolder.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dll/win32/shell32/shlfolder.cpp b/dll/win32/shell32/shlfolder.cpp
index ee6c78b47fd..92dff6c81ef 100644
--- a/dll/win32/shell32/shlfolder.cpp
+++ b/dll/win32/shell32/shlfolder.cpp
@@ -241,8 +241,9 @@ HRESULT SHELL32_CompareDetails(IShellFolder2* isf, LPARAM 
lParam, LPCITEMIDLIST
     SHELLDETAILS sd;
     WCHAR wszItem1[MAX_PATH], wszItem2[MAX_PATH];
     HRESULT hres;
+    UINT col = LOWORD(lParam); // Column index without SHCIDS_* flags
 
-    hres = isf->GetDetailsOf(pidl1, lParam, &sd);
+    hres = isf->GetDetailsOf(pidl1, col, &sd);
     if (FAILED(hres))
         return MAKE_COMPARE_HRESULT(1);
 
@@ -250,7 +251,7 @@ HRESULT SHELL32_CompareDetails(IShellFolder2* isf, LPARAM 
lParam, LPCITEMIDLIST
     if (FAILED(hres))
         return MAKE_COMPARE_HRESULT(1);
 
-    hres = isf->GetDetailsOf(pidl2, lParam, &sd);
+    hres = isf->GetDetailsOf(pidl2, col, &sd);
     if (FAILED(hres))
         return MAKE_COMPARE_HRESULT(1);
 

Reply via email to