[6/7] rpcrt4: Allow enums as union switch types

Dan Hipschman dsh at linux.ucla.edu
Mon Jun 25 20:26:42 CDT 2007


This patch to rpcrt4 allows enums to be used as a union switch type.
Tests for this are included in the next patch.

---
 dlls/rpcrt4/ndr_marshall.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index de6f509..423e2ee 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -4022,9 +4022,11 @@ static ULONG get_discriminant(unsigned char fc, unsigned char *pMemory)
     case RPC_FC_WCHAR:
     case RPC_FC_SHORT:
     case RPC_FC_USHORT:
+    case RPC_FC_ENUM16:
         return *(USHORT *)pMemory;
     case RPC_FC_LONG:
     case RPC_FC_ULONG:
+    case RPC_FC_ENUM32:
         return *(ULONG *)pMemory;
     default:
         FIXME("Unhandled base type: 0x%02x\n", fc);



More information about the wine-patches mailing list