msi: Only apply the last font style in the list of styles.
This commit is contained in:
parent
971ab9aa47
commit
f16ddf1b32
|
@ -240,29 +240,33 @@ LPWSTR msi_dialog_get_name( msi_dialog *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;
|
||||
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 ret;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!p || !q)
|
||||
return NULL;
|
||||
|
||||
*rest = ++q;
|
||||
len = q - p;
|
||||
|
|
Loading…
Reference in New Issue