small fix SafeArryDestroy with test

Rein Klazes wijn at wanadoo.nl
Mon Jan 31 02:28:19 CST 2005


Hi,

Makes WJChess, a French made chess game, accept moves.

Changelog:
	dlls/oleaut32		: safearray.c
	dlls/oleaut32/tests	: safearray.c
	SafeArrayDestroy() returns success when called with a NULL
	pointer. Added to the test cases.

Rein.
-------------- next part --------------
--- wine/dlls/oleaut32/safearray.c	2005-01-04 09:48:03.000000000 +0100
+++ mywine/dlls/oleaut32/safearray.c	2005-01-30 14:17:55.000000000 +0100
@@ -1337,7 +1337,7 @@ HRESULT WINAPI SafeArrayDestroy(SAFEARRA
   TRACE("(%p)\n", psa);
 
   if(!psa)
-    return E_INVALIDARG;
+    return S_OK;
 
   if(psa->cLocks > 0)
     return DISP_E_ARRAYISLOCKED;
--- wine/dlls/oleaut32/tests/safearray.c	2005-01-11 15:01:11.000000000 +0100
+++ mywine/dlls/oleaut32/tests/safearray.c	2005-01-31 09:08:22.000000000 +0100
@@ -258,6 +258,9 @@ static void test_safearray(void)
 	LONG		l;
 	unsigned char	*ptr1, *ptr2;
 
+	hres = SafeArrayDestroy( NULL);
+	ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
+
 	bound.cElements	= 1;
 	bound.lLbound	= 0;
 	a = SafeArrayCreate(-1, 1, &bound);


More information about the wine-patches mailing list