From af97de39a2bc3509286565f670a9feef723deaf3 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Tue, 20 Feb 2018 14:36:31 +0200 Subject: [PATCH] [SHELL32] CShellItem: Fix return value of Compare method --- dll/win32/shell32/CShellItem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/CShellItem.cpp b/dll/win32/shell32/CShellItem.cpp index 1e06c8cff80..5ef965de478 100644 --- a/dll/win32/shell32/CShellItem.cpp +++ b/dll/win32/shell32/CShellItem.cpp @@ -199,9 +199,13 @@ HRESULT WINAPI CShellItem::Compare(IShellItem *oth, SICHINTF hint, int *piOrder) } } - if (SUCCEEDED(hr)) + if(FAILED(hr)) + return hr; + + if(*piOrder) + return S_FALSE; + else return S_OK; - return hr; } HRESULT WINAPI CShellItem::GetClassID(CLSID *pClassID)