Alexander Dorofeyev : quartz: Do not ignore current position in IEnumRegFiltersImpl_Next.
Alexandre Julliard
julliard at winehq.org
Wed Jun 25 16:43:57 CDT 2008
Module: wine
Branch: master
Commit: 2d8f7268abae9c3a7086e62cf9cbcf95125c6d22
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d8f7268abae9c3a7086e62cf9cbcf95125c6d22
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Tue Jun 24 16:44:57 2008 +0300
quartz: Do not ignore current position in IEnumRegFiltersImpl_Next.
---
dlls/quartz/enumregfilters.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/enumregfilters.c b/dlls/quartz/enumregfilters.c
index 2816f08..f8d7820 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;
More information about the wine-cvs
mailing list