James Hawkins : msi: Only apply the last font style in the list of
styles.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Oct 4 04:25:31 CDT 2006
Module: wine
Branch: master
Commit: f16ddf1b325b2e2b57b4bd940b7372135b968d00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f16ddf1b325b2e2b57b4bd940b7372135b968d00
Author: James Hawkins <truiken at gmail.com>
Date: Tue Oct 3 19:15:08 2006 -0700
msi: Only apply the last font style in the list of styles.
---
dlls/msi/dialog.c | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 2ffc3db..55743ca 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -240,30 +240,34 @@ LPWSTR msi_dialog_get_name( msi_dialog *
* msi_dialog_get_style
*
* Extract the {\style} string from the front of the text to display and
- * update the pointer.
+ * update the pointer. Only the last style in a list is applied.
*/
static LPWSTR msi_dialog_get_style( LPCWSTR p, LPCWSTR *rest )
{
- LPWSTR ret = NULL;
- LPCWSTR q, i;
+ LPWSTR ret;
+ LPCWSTR q, i, first;
DWORD len;
+ q = NULL;
*rest = p;
if( !p )
- return ret;
- if( *p++ != '{' )
- return ret;
- q = strchrW( p, '}' );
- if( !q )
- return ret;
- if( *p == '\\' || *p == '&' )
- p++;
+ return NULL;
+
+ while ((first = strchrW( p, '{' )) && (q = strchrW( first + 1, '}' )))
+ {
+ p = first + 1;
+ if( *p == '\\' || *p == '&' )
+ p++;
+
+ /* little bit of sanity checking to stop us getting confused with RTF */
+ for( i=p; i<q; i++ )
+ if( *i == '}' || *i == '\\' )
+ return NULL;
+ }
+
+ if (!p || !q)
+ return NULL;
- /* little bit of sanity checking to stop us getting confused with RTF */
- for( i=p; i<q; i++ )
- if( *i == '}' || *i == '\\' )
- return ret;
-
*rest = ++q;
len = q - p;
More information about the wine-cvs
mailing list