rpcrt4: Always skip the conformance format, even if conformance is not present in the buffer.

Add an identical SkipVariance function to make the code clearer.
This commit is contained in:
Alexandre Julliard 2010-04-05 21:59:30 +02:00
parent 5728d6b402
commit c1a9dc8ad2
1 changed files with 8 additions and 8 deletions

View File

@ -644,14 +644,16 @@ finish_conf:
static inline PFORMAT_STRING SkipConformance(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING pFormat)
{
if (IsConformanceOrVariancePresent(pFormat))
{
if (pStubMsg->fHasNewCorrDesc)
pFormat += 6;
else
pFormat += 4;
}
return pFormat;
return pFormat;
}
static inline PFORMAT_STRING SkipVariance(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
{
return SkipConformance( pStubMsg, pFormat );
}
/* multiply two numbers together, raising an RPC_S_INVALID_BOUND exception if
@ -1842,7 +1844,7 @@ static inline void array_buffer_size(
alignment = pFormat[1] + 1;
pFormat = SkipConformance(pStubMsg, pFormat + 4);
pFormat = SkipConformance(pStubMsg, pFormat);
pFormat = SkipVariance(pStubMsg, pFormat);
SizeVariance(pStubMsg);
@ -1942,10 +1944,8 @@ static inline void array_write_variance_and_marshall(
esize = *(const WORD*)(pFormat+2);
alignment = pFormat[1] + 1;
/* conformance */
pFormat = SkipConformance(pStubMsg, pFormat + 4);
/* variance */
pFormat = SkipConformance(pStubMsg, pFormat);
pFormat = SkipVariance(pStubMsg, pFormat);
WriteVariance(pStubMsg);