From 2d8f7268abae9c3a7086e62cf9cbcf95125c6d22 Mon Sep 17 00:00:00 2001 From: Alexander Dorofeyev Date: Tue, 24 Jun 2008 16:44:57 +0300 Subject: [PATCH] quartz: Do not ignore current position in IEnumRegFiltersImpl_Next. --- dlls/quartz/enumregfilters.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/enumregfilters.c b/dlls/quartz/enumregfilters.c index 2816f08f866..f8d7820d511 100644 --- a/dlls/quartz/enumregfilters.c +++ b/dlls/quartz/enumregfilters.c @@ -152,7 +152,7 @@ static HRESULT WINAPI IEnumRegFiltersImpl_Next(IEnumRegFilters * iface, ULONG cF for(i = 0; i < cFetched; i++) { /* The string in the REGFILTER structure must be allocated in the same block as the REGFILTER structure itself */ - ppRegFilter[i] = CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); + ppRegFilter[i] = CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[This->uIndex + i].Name)+1)*sizeof(WCHAR)); if (!ppRegFilter[i]) { while(i) @@ -162,9 +162,10 @@ static HRESULT WINAPI IEnumRegFiltersImpl_Next(IEnumRegFilters * iface, ULONG cF } return E_OUTOFMEMORY; } - ppRegFilter[i]->Clsid = This->RegFilters[i].Clsid; + ppRegFilter[i]->Clsid = This->RegFilters[This->uIndex + i].Clsid; ppRegFilter[i]->Name = (WCHAR*)((char*)ppRegFilter[i]+sizeof(REGFILTER)); - CopyMemory(ppRegFilter[i]->Name, This->RegFilters[i].Name, (strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); + CopyMemory(ppRegFilter[i]->Name, This->RegFilters[This->uIndex + i].Name, + (strlenW(This->RegFilters[This->uIndex + i].Name)+1)*sizeof(WCHAR)); } This->uIndex += cFetched; -- 2.11.4.GIT