rpcrt4: Properly size complex reference pointers.

This commit is contained in:
Henri Verbeet 2011-09-22 21:40:06 +02:00 committed by Alexandre Julliard
parent 6b7ccdb734
commit f687728c43
1 changed files with 9 additions and 2 deletions

View File

@ -149,6 +149,15 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
DWORD size;
switch(*pFormat)
{
case RPC_FC_RP:
if (pFormat[1] & RPC_FC_P_SIMPLEPOINTER)
{
FIXME("Simple reference pointer (type %#x).\n", pFormat[2]);
size = sizeof(void *);
break;
}
size = calc_arg_size(pStubMsg, &pFormat[2] + *(WORD *)&pFormat[2]);
break;
case RPC_FC_STRUCT:
case RPC_FC_PSTRUCT:
size = *(const WORD*)(pFormat + 2);
@ -202,8 +211,6 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
break;
default:
FIXME("Unhandled type %02x\n", *pFormat);
/* fallthrough */
case RPC_FC_RP:
size = sizeof(void *);
break;
}