Robert Shearman : rpcrt4:
The arm type mask should be comparing the highest byte against 0x80,
as documented on MSDN.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 15 07:35:23 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 07d032b24ba76512cd7bed8a0d712571d37511ab
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=07d032b24ba76512cd7bed8a0d712571d37511ab
Author: Robert Shearman <rob at codeweavers.com>
Date: Sat May 13 17:00:27 2006 +0100
rpcrt4: The arm type mask should be comparing the highest byte against 0x80, as documented on MSDN.
Fix base type arm handling on little-endian machines, as the current
code would always pass in the address to the format char of 0x80
instead of the base type format char.
---
dlls/rpcrt4/ndr_marshall.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 18c1874..0fbf0f3 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -3074,10 +3074,10 @@ unsigned char * WINAPI NdrNonEncapsulat
return NULL;
type = *(const unsigned short*)pFormat;
- if(type & 0x8000)
+ if((type & 0xff00) == 0x8000)
{
- pFormat++;
- return NdrBaseTypeMarshall(pStubMsg, pMemory, pFormat);
+ unsigned char basetype = LOBYTE(type);
+ return NdrBaseTypeMarshall(pStubMsg, pMemory, &basetype);
}
else
{
@@ -3171,10 +3171,10 @@ unsigned char * WINAPI NdrNonEncapsulat
*ppMemory = NdrAllocate(pStubMsg, size);
type = *(const unsigned short*)pFormat;
- if(type & 0x8000)
+ if((type & 0xff00) == 0x8000)
{
- pFormat++;
- return NdrBaseTypeUnmarshall(pStubMsg, ppMemory, pFormat, fMustAlloc);
+ unsigned char basetype = LOBYTE(type);
+ return NdrBaseTypeUnmarshall(pStubMsg, ppMemory, &basetype, fMustAlloc);
}
else
{
@@ -3218,10 +3218,10 @@ void WINAPI NdrNonEncapsulatedUnionBuffe
return;
type = *(const unsigned short*)pFormat;
- if(type & 0x8000)
+ if((type & 0xff00) == 0x8000)
{
- pFormat++;
- NdrBaseTypeBufferSize(pStubMsg, pMemory, pFormat);
+ unsigned char basetype = LOBYTE(type);
+ NdrBaseTypeBufferSize(pStubMsg, pMemory, &basetype);
}
else
{
More information about the wine-cvs
mailing list