Alexandre Julliard : rpcrt4: Preserve the previous MaxCount value when computing variance through a callback .
Module: wine Branch: master Commit: fa847909f2ae6a8118c300809c77d12e317dea3a URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa847909f2ae6a8118c300809c... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 14 12:57:30 2011 +0200 rpcrt4: Preserve the previous MaxCount value when computing variance through a callback. --- dlls/rpcrt4/ndr_marshall.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 1e99c2e..c62675d 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -590,6 +590,8 @@ PFORMAT_STRING ComputeConformanceOrVariance( case RPC_FC_CALLBACK: { unsigned char *old_stack_top = pStubMsg->StackTop; + ULONG_PTR max_count, old_max_count = pStubMsg->MaxCount; + pStubMsg->StackTop = ptr; /* ofs is index into StubDesc->apfnExprEval */ @@ -599,7 +601,9 @@ PFORMAT_STRING ComputeConformanceOrVariance( pStubMsg->StackTop = old_stack_top; /* the callback function always stores the computed value in MaxCount */ - *pCount = pStubMsg->MaxCount; + max_count = pStubMsg->MaxCount; + pStubMsg->MaxCount = old_max_count; + *pCount = max_count; goto finish_conf; } default:
participants (1)
-
Alexandre Julliard