From 348c124ac996fd623d9cd31ac11700cdf915dd3e Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Wed, 30 Jul 2008 09:03:08 +0100 Subject: [PATCH] crypt32: fixed the skipped character tests on Vista. --- dlls/crypt32/tests/base64.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 965b3f8..0fe3e8d 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -273,6 +273,7 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, strcat(str, toDecode); if (trailer) strcat(str, trailer); + SetLastError(0xdeadbeef); ret = pCryptStringToBinaryA(str, 0, useFormat, NULL, &bufLen, NULL, NULL); /* expect failure with no header, and success with one */ @@ -290,7 +291,8 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, &skipped, &usedFormat); - ok(skipped == strlen(garbage), + ok((header && skipped == strlen(garbage)) || + (!header && skipped == 0) /* Vista */, "Expected %d characters of \"%s\" skipped when trying format %08x, got %d (used format is %08x)\n", lstrlenA(garbage), str, useFormat, skipped, usedFormat); HeapFree(GetProcessHeap(), 0, buf); -- 1.5.6.1.1071.g76fb