Commit 4955fabb authored by Nicolas Le Cam's avatar Nicolas Le Cam Committed by Alexandre Julliard

shell32/tests: Fix crash when launched from drive root dir.

parent bf7fa5b6
...@@ -818,8 +818,8 @@ static void test_GetAttributesOf(void) ...@@ -818,8 +818,8 @@ static void test_GetAttributesOf(void)
win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n"); win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n");
return; return;
} }
if(cCurrDirA[len-1] == '\\') if (len > 3 && cCurrDirA[len-1] == '\\')
cCurrDirA[len-1] = 0; cCurrDirA[len-1] = 0;
/* create test directory */ /* create test directory */
CreateFilesFolders(); CreateFilesFolders();
...@@ -862,7 +862,7 @@ static void test_GetAttributesOf(void) ...@@ -862,7 +862,7 @@ static void test_GetAttributesOf(void)
hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags); hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags);
ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr); ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr);
ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags); ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags);
/* free memory */ /* free memory */
IMalloc_Free(ppM, newPIDL); IMalloc_Free(ppM, newPIDL);
...@@ -871,7 +871,7 @@ static void test_GetAttributesOf(void) ...@@ -871,7 +871,7 @@ static void test_GetAttributesOf(void)
Cleanup(); Cleanup();
IShellFolder_Release(IDesktopFolder); IShellFolder_Release(IDesktopFolder);
} }
static void test_SHGetPathFromIDList(void) static void test_SHGetPathFromIDList(void)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment