[MSDMO]
authorThomas Faber <thomas.faber@reactos.org>
Thu, 8 May 2014 13:24:09 +0000 (13:24 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 8 May 2014 13:24:09 +0000 (13:24 +0000)
- Actually copy output string in IEnumDMO_fnNext. Patch by Víctor Martínez
CORE-8151 #resolve

svn path=/trunk/; revision=63188

reactos/dll/directx/wine/msdmo/dmoreg.c

index 48968b3..84c1ed9 100644 (file)
@@ -607,9 +607,9 @@ static HRESULT WINAPI IEnumDMO_fnNext(
         hres = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE) szValue, &len); 
         if (ERROR_SUCCESS == hres)
        {
-            Names[count] = HeapAlloc(GetProcessHeap(), 0, strlenW(szValue) + 1);
+            Names[count] = HeapAlloc(GetProcessHeap(), 0, (strlenW(szValue) + 1) * sizeof(WCHAR));
            if (Names[count])
-                strcmpW(Names[count], szValue);
+                strcpyW(Names[count], szValue);
        }
         wsprintfW(szGuidKey,szToGuidFmt,szNextKey);
         CLSIDFromString(szGuidKey, &pCLSID[count]);