diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c index b686683f6f4..2bbd2b2b1aa 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 dbf29a5f3b5..91f3040c323 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);