Commit 30a7d0a5 authored by Alexandre Julliard's avatar Alexandre Julliard

shell32/tests: Avoid some array bounds warnings.

parent 6098a045
...@@ -1806,6 +1806,7 @@ static void test_ITEMIDLIST_format(void) { ...@@ -1806,6 +1806,7 @@ static void test_ITEMIDLIST_format(void) {
cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW)) cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW))
{ {
struct FileStructW *pFileStructW = (struct FileStructW *)(((LPBYTE)pidlFile)+cbOffset); struct FileStructW *pFileStructW = (struct FileStructW *)(((LPBYTE)pidlFile)+cbOffset);
WCHAR *name = pFileStructW->wszName;
ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen, ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen,
"FileStructW's offset and length should add up to the PIDL's length!\n"); "FileStructW's offset and length should add up to the PIDL's length!\n");
...@@ -1842,9 +1843,9 @@ static void test_ITEMIDLIST_format(void) { ...@@ -1842,9 +1843,9 @@ static void test_ITEMIDLIST_format(void) {
/* TODO: Perform check for date being within one day.*/ /* TODO: Perform check for date being within one day.*/
} }
ok (!lstrcmpW(wszFile[i], pFileStructW->wszName) || ok (!lstrcmpW(wszFile[i], name) ||
!lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)) || /* Vista */ !lstrcmpW(wszFile[i], name + 9) || /* Vista */
!lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 26)), /* Win7 */ !lstrcmpW(wszFile[i], name + 11), /* Win7 */
"The filename should be stored in unicode at this position!\n"); "The filename should be stored in unicode at this position!\n");
} }
} }
......
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