Commit 02dcc198 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

oleaut32: Add tests for DispGetParam. Fix two issues that crashed the tests.

parent f3d194b3
...@@ -130,6 +130,13 @@ HRESULT WINAPI DispGetParam( ...@@ -130,6 +130,13 @@ HRESULT WINAPI DispGetParam(
TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n", TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n",
position, pdispparams->cArgs, pdispparams->cNamedArgs); position, pdispparams->cArgs, pdispparams->cNamedArgs);
if (pdispparams->cArgs > 0 && !pdispparams->rgvarg)
return E_INVALIDARG;
if (!pvarResult)
return E_INVALIDARG;
if (position < pdispparams->cArgs) { if (position < pdispparams->cArgs) {
/* positional arg? */ /* positional arg? */
pos = pdispparams->cArgs - position - 1; pos = pdispparams->cArgs - position - 1;
......
...@@ -6,6 +6,7 @@ TESTDLL = oleaut32.dll ...@@ -6,6 +6,7 @@ TESTDLL = oleaut32.dll
IMPORTS = oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32 IMPORTS = oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32
CTESTS = \ CTESTS = \
dispatch.c \
olefont.c \ olefont.c \
olepicture.c \ olepicture.c \
safearray.c \ safearray.c \
......
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