shell32/tests: Fix crash when launched from drive root dir.
Nicolas Le Cam
niko.lecam at gmail.com
Sun Apr 5 16:01:35 CDT 2009
---
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 dbf3598..d3d77be 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)
{
--
1.5.6.3
--=-12Ajco0b2nm33iP5Cm8m--
More information about the wine-patches
mailing list