https://git.reactos.org/?p=reactos.git;a=commitdiff;h=679c95597ca0a83c7779c…
commit 679c95597ca0a83c7779c288af96cce6c41c96ae
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Mon Aug 17 18:17:24 2020 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Mon Aug 17 18:17:24 2020 +0200
[SHELL32] Fix sorting on size for big files
CORE-17205
---
dll/win32/shell32/folders/CFSFolder.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/folders/CFSFolder.cpp
b/dll/win32/shell32/folders/CFSFolder.cpp
index 918ba8f5ff2..9aa8281daa4 100644
--- a/dll/win32/shell32/folders/CFSFolder.cpp
+++ b/dll/win32/shell32/folders/CFSFolder.cpp
@@ -968,7 +968,12 @@ HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam,
result = wcsicmp(pExtension1, pExtension2);
break;
case 3: /* Size */
- result = pData1->u.file.dwFileSize - pData2->u.file.dwFileSize;
+ if (pData1->u.file.dwFileSize > pData2->u.file.dwFileSize)
+ result = 1;
+ else if (pData1->u.file.dwFileSize < pData2->u.file.dwFileSize)
+ result = -1;
+ else
+ result = 0;
break;
case 4: /* Modified */
result = pData1->u.file.uFileDate - pData2->u.file.uFileDate;