Fix incorrect test in dlls/crypt32/tests/encode.c

Gerald Pfeifer gerald at pfeifer.com
Thu Jun 18 12:26:39 CDT 2009


The way this is currently written, the condition is always true by
virtue of || OSS_MORE_INPUT; I am pretty sure this rather out to read
GetLastError() == OSS_MORE_INPUT  instead.

Gerald

ChangeLog:
Fix incorrect logic condition in test_decodePKCSAttribute().

diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c
index e406194..3e99800 100644
--- a/dlls/crypt32/tests/encode.c
+++ b/dlls/crypt32/tests/encode.c
@@ -5843,7 +5843,8 @@ static void test_decodePKCSAttribute(DWORD dwEncoding)
      * I doubt an app depends on that.
      */
     ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD ||
-     GetLastError() == CRYPT_E_ASN1_CORRUPT || OSS_MORE_INPUT /* Win9x */),
+     GetLastError() == CRYPT_E_ASN1_CORRUPT ||
+     GetLastError() == OSS_MORE_INPUT /* Win9x */),
      "Expected CRYPT_E_ASN1_EOD, CRYPT_E_ASN1_CORRUPT, or OSS_MORE_INPUT, got %x\n",
      GetLastError());
     ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE,



More information about the wine-patches mailing list