From 63f2121d92bd404a0430f78bd85f43b0941794ef Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 17 Jan 2011 23:27:39 -0600 Subject: [PATCH] oleaut32: Deserialize VT_BOOL as 2 bytes, not 4. --- dlls/oleaut32/tmarshal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 45aacf24464..9d3d73e9d9b 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -556,7 +556,6 @@ _xsize(const TYPEDESC *td, ITypeInfo *tinfo) { return sizeof(DATE); case VT_CY: return sizeof(CY); - /* FIXME: VT_BOOL should return 2? */ case VT_VARIANT: return sizeof(VARIANT)+3; /* FIXME: why the +3? */ case VT_CARRAY: { @@ -573,6 +572,7 @@ _xsize(const TYPEDESC *td, ITypeInfo *tinfo) { return 8; case VT_UI2: case VT_I2: + case VT_BOOL: return 2; case VT_UI1: case VT_I1: @@ -628,7 +628,6 @@ serialize_param( if (writeit) hres = xbuf_add(buf,(LPBYTE)arg,8); return hres; - case VT_BOOL: case VT_ERROR: case VT_INT: case VT_UINT: @@ -642,6 +641,7 @@ serialize_param( return hres; case VT_I2: case VT_UI2: + case VT_BOOL: hres = S_OK; if (debugout) TRACE_(olerelay)("%04x\n",*arg & 0xffff); if (writeit) @@ -927,7 +927,6 @@ deserialize_param( if (debugout) TRACE_(olerelay)("%x%x",arg[0],arg[1]); return hres; case VT_ERROR: - case VT_BOOL: case VT_I4: case VT_INT: case VT_UINT: @@ -941,6 +940,7 @@ deserialize_param( return hres; case VT_I2: case VT_UI2: + case VT_BOOL: if (readit) { DWORD x; hres = xbuf_get(buf,(LPBYTE)&x,sizeof(DWORD));