Rob Shearman : rpcrt4: Fix the return value of NdrFullPointerQueryRefId for a pointer ID of 0.
Alexandre Julliard
julliard at winehq.org
Wed Nov 18 09:40:44 CST 2009
Module: wine
Branch: master
Commit: 51dbc8d06b65a45d4507b6ad15d78c4e24af9689
URL: http://source.winehq.org/git/wine.git/?a=commit;h=51dbc8d06b65a45d4507b6ad15d78c4e24af9689
Author: Rob Shearman <robertshearman at gmail.com>
Date: Wed Nov 18 00:25:20 2009 +0000
rpcrt4: Fix the return value of NdrFullPointerQueryRefId for a pointer ID of 0.
---
dlls/rpcrt4/ndr_fullpointer.c | 3 +++
dlls/rpcrt4/tests/ndr_marshall.c | 1 -
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c
index b686683..2bbd2b2 100644
--- a/dlls/rpcrt4/ndr_fullpointer.c
+++ b/dlls/rpcrt4/ndr_fullpointer.c
@@ -161,6 +161,9 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
{
TRACE("(%p, 0x%x, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
+ if (!RefId)
+ return 1;
+
expand_pointer_table_if_necessary(pXlatTables, RefId);
pXlatTables->NextRefId = max(RefId + 1, pXlatTables->NextRefId);
diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c
index dbf29a5..91f3040 100644
--- a/dlls/rpcrt4/tests/ndr_marshall.c
+++ b/dlls/rpcrt4/tests/ndr_marshall.c
@@ -1047,7 +1047,6 @@ static void test_fullpointer_xlat(void)
/* "unmarshaling" phase */
ret = NdrFullPointerQueryRefId(pXlatTables, 0x0, 0, &Pointer);
- todo_wine
ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret);
ret = NdrFullPointerQueryRefId(pXlatTables, 0x2, 0, &Pointer);
More information about the wine-cvs
mailing list