msi: allow conditions to evaluate properties over 256 characters
Aric Stewart
aric at codeweavers.com
Wed Feb 9 05:40:29 CST 2005
Do not limit properties to 256 characters when evaluating them.
-------------- next part --------------
Index: dlls/msi/cond.y
===================================================================
RCS file: /home/wine/wine/dlls/msi/cond.y,v
retrieving revision 1.15
diff -u -u -r1.15 cond.y
--- dlls/msi/cond.y 8 Feb 2005 12:13:49 -0000 1.15
+++ dlls/msi/cond.y 9 Feb 2005 11:40:39 -0000
@@ -448,14 +448,22 @@
{
DWORD sz;
COND_input* cond = (COND_input*) info;
- $$ = HeapAlloc( GetProcessHeap(), 0, 0x100*sizeof (WCHAR) );
- /* Lookup the identifier */
-
- sz=0x100;
- if (MSI_GetPropertyW(cond->package,$1,$$,&sz) != ERROR_SUCCESS)
+ sz = 0;
+ MSI_GetPropertyW(cond->package, $1, NULL, &sz);
+ if (sz == 0)
+ {
+ $$ = HeapAlloc( GetProcessHeap(), 0 ,sizeof(WCHAR));
+ $$[0] = 0;
+ }
+ else
{
- $$[0]=0;
+ sz ++;
+ $$ = HeapAlloc( GetProcessHeap(), 0, sz*sizeof (WCHAR) );
+
+ /* Lookup the identifier */
+
+ MSI_GetPropertyW(cond->package,$1,$$,&sz);
}
HeapFree( GetProcessHeap(), 0, $1 );
}
More information about the wine-patches
mailing list