Commit 53f6d82e authored by Jiajin Cui's avatar Jiajin Cui Committed by Alexandre Julliard

win32u: Don't allow a replaced font to be a replacement.

This is to prevent replacement loops.
parent 88ead398
...@@ -903,6 +903,12 @@ static BOOL add_family_replacement( const WCHAR *new_name, const WCHAR *replace ...@@ -903,6 +903,12 @@ static BOOL add_family_replacement( const WCHAR *new_name, const WCHAR *replace
return FALSE; return FALSE;
} }
if (family->replacement)
{
TRACE( "%s is replaced by another font, skipping.\n", debugstr_w(replace) );
return FALSE;
}
if (!(new_family = create_family( new_name, NULL ))) return FALSE; if (!(new_family = create_family( new_name, NULL ))) return FALSE;
new_family->replacement = family; new_family->replacement = family;
family->refcount++; family->refcount++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment