From 83f56a8bfaac1dd0ef8c844851f443864e76ba8c Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Sun, 28 Sep 2008 17:55:20 +0100 Subject: [PATCH] shell32: print the correct GUIDs in the shellpath tests. --- dlls/shell32/tests/shellpath.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index a1cf2d3..f0053ce 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -272,11 +272,11 @@ static const char *getFolderName(int folder) } } -static const char *printGUID(const GUID *guid) +static char *printGUID(const GUID *guid) { - static char guidSTR[39]; + char *guidSTR = HeapAlloc(GetProcessHeap(), 0, 39); - if (!guid) return NULL; + if (!guid || !guidSTR) return NULL; sprintf(guidSTR, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", guid->Data1, guid->Data2, guid->Data3, @@ -551,10 +551,15 @@ static void matchGUID(int folder, const GUID *guid) pidlLast->mkid.abID[0] == PT_GUID)) { GUID *shellGuid = (GUID *)(pidlLast->mkid.abID + 2); + char *shellGuidStr = printGUID(shellGuid); + char *guidStr = printGUID(guid); ok(IsEqualIID(shellGuid, guid), "%s: got GUID %s, expected %s\n", getFolderName(folder), - printGUID(shellGuid), printGUID(guid)); + shellGuidStr, guidStr); + + HeapFree(GetProcessHeap(), 0, shellGuidStr); + HeapFree(GetProcessHeap(), 0, guidStr); } IMalloc_Free(pMalloc, pidl); } -- 1.5.6.1.1071.g76fb