James Hawkins : msi: Simplify the check for a valid product code.
Alexandre Julliard
julliard at winehq.org
Mon Feb 25 06:51:13 CST 2008
Module: wine
Branch: master
Commit: f178985db3fc492acee7b589bc0f46b78bb74b9e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f178985db3fc492acee7b589bc0f46b78bb74b9e
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Sun Feb 24 20:03:24 2008 -0600
msi: Simplify the check for a valid product code.
---
dlls/msi/source.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index c373df2..66a3af1 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -351,16 +351,13 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
LPCWSTR szProperty, LPWSTR szValue,
LPDWORD pcchValue)
{
+ WCHAR squished_pc[GUID_SIZE];
HKEY sourcekey;
UINT rc;
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szProperty));
- if (!szProduct || !*szProduct)
- return ERROR_INVALID_PARAMETER;
-
- if (lstrlenW(szProduct) != GUID_SIZE - 1 ||
- (szProduct[0] != '{' && szProduct[GUID_SIZE - 2] != '}'))
+ if (!szProduct || !squash_guid(szProduct, squished_pc))
return ERROR_INVALID_PARAMETER;
if (szValue && !pcchValue)
More information about the wine-cvs
mailing list