advpack:reg.c: Cast-qual warning fix
Andrew Talbot
Andrew.Talbot at talbotville.com
Mon Aug 28 11:18:00 CDT 2006
Changelog:
advpack:reg.c: Cast-qual warning fix.
diff -urN a/dlls/advpack/reg.c b/dlls/advpack/reg.c
--- a/dlls/advpack/reg.c 2006-06-14 12:55:31.000000000 +0100
+++ b/dlls/advpack/reg.c 2006-08-28 17:00:18.000000000 +0100
@@ -255,11 +255,14 @@
/* FIXME: read AdvOptions val for dwFlags */
ZeroMemory(&cabinfo, sizeof(CABINFOW));
cabinfo.pszInf = tmp_ini_path;
- cabinfo.pszSection = (LPWSTR)pszSection;
+ cabinfo.pszSection = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(pszSection) + 1) * sizeof(WCHAR));
+ lstrcpyW(cabinfo.pszSection, pszSection);
cabinfo.dwFlags = 0;
hr = ExecuteCabW(NULL, &cabinfo, NULL);
+ HeapFree(GetProcessHeap(), 0, cabinfo.pszSection);
+
done:
DeleteFileW(tmp_ini_path);
More information about the wine-patches
mailing list