Nicolas Le Cam : shell32/tests: Fix crash when launched from drive root dir .
Alexandre Julliard
julliard at winehq.org
Mon Apr 6 09:00:33 CDT 2009
Module: wine
Branch: master
Commit: 4955fabbd46b62a89f9bccf146b29b65e740e127
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4955fabbd46b62a89f9bccf146b29b65e740e127
Author: Nicolas Le Cam <niko.lecam at gmail.com>
Date: Sun Apr 5 23:01:35 2009 +0200
shell32/tests: Fix crash when launched from drive root dir.
---
dlls/shell32/tests/shlfolder.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 60df9e6..8c5f1dc 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -818,8 +818,8 @@ static void test_GetAttributesOf(void)
win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n");
return;
}
- if(cCurrDirA[len-1] == '\\')
- cCurrDirA[len-1] = 0;
+ if (len > 3 && cCurrDirA[len-1] == '\\')
+ cCurrDirA[len-1] = 0;
/* create test directory */
CreateFilesFolders();
@@ -862,7 +862,7 @@ static void test_GetAttributesOf(void)
hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags);
ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr);
ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags);
-
+
/* free memory */
IMalloc_Free(ppM, newPIDL);
@@ -871,7 +871,7 @@ static void test_GetAttributesOf(void)
Cleanup();
IShellFolder_Release(IDesktopFolder);
-}
+}
static void test_SHGetPathFromIDList(void)
{
More information about the wine-cvs
mailing list