Andrew Talbot : msi: Cast-qual warning fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 24 07:06:07 CDT 2007
Module: wine
Branch: master
Commit: 0e14c29d6616febb30683b830b8a06bd404b2792
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e14c29d6616febb30683b830b8a06bd404b2792
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Mon Jul 23 18:53:19 2007 +0100
msi: Cast-qual warning fix.
---
dlls/msi/action.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 953ecb5..953c65b 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -630,22 +630,26 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if (szPackagePath)
{
LPWSTR p, check, dir;
+ LPCWSTR file;
dir = strdupW(szPackagePath);
p = strrchrW(dir, '\\');
if (p)
+ {
*(++p) = 0;
+ file = szPackagePath + (p - dir);
+ }
else
{
msi_free(dir);
dir = msi_alloc(MAX_PATH*sizeof(WCHAR));
GetCurrentDirectoryW(MAX_PATH, dir);
lstrcatW(dir, cszbs);
- p = (LPWSTR)szPackagePath;
+ file = szPackagePath;
}
msi_free( package->PackagePath );
- package->PackagePath = msi_alloc((lstrlenW(dir) + lstrlenW(p) + 2) * sizeof(WCHAR));
+ package->PackagePath = msi_alloc((lstrlenW(dir) + lstrlenW(file) + 1) * sizeof(WCHAR));
if (!package->PackagePath)
{
msi_free(dir);
@@ -653,8 +657,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
}
lstrcpyW(package->PackagePath, dir);
- lstrcatW(package->PackagePath, cszbs);
- lstrcatW(package->PackagePath, p);
+ lstrcatW(package->PackagePath, file);
check = msi_dup_property( package, cszSourceDir );
if (!check)
More information about the wine-cvs
mailing list