usp10/tests: Catch case where enumerated font name is too long.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
This commit is contained in:
parent
5b33f18cfc
commit
0072188b69
|
@ -1993,6 +1993,11 @@ static void test_ScriptGetFontProperties(HDC hdc)
|
||||||
|
|
||||||
for (i = 0; i < efnd.total; i++)
|
for (i = 0; i < efnd.total; i++)
|
||||||
{
|
{
|
||||||
|
if (strlen((char *)efnd.elf[i].elfFullName) >= LF_FACESIZE)
|
||||||
|
{
|
||||||
|
trace("Font name to long to test: %s\n",(char *)efnd.elf[i].elfFullName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
lstrcpyA(lf.lfFaceName, (char *)efnd.elf[i].elfFullName);
|
lstrcpyA(lf.lfFaceName, (char *)efnd.elf[i].elfFullName);
|
||||||
font = CreateFontIndirectA(&lf);
|
font = CreateFontIndirectA(&lf);
|
||||||
oldfont = SelectObject(hdc, font);
|
oldfont = SelectObject(hdc, font);
|
||||||
|
@ -2034,6 +2039,11 @@ static void test_ScriptGetFontProperties(HDC hdc)
|
||||||
|
|
||||||
for (i = 0; i < efnd.total; i++)
|
for (i = 0; i < efnd.total; i++)
|
||||||
{
|
{
|
||||||
|
if (strlen((char *)efnd.elf[i].elfFullName) >= LF_FACESIZE)
|
||||||
|
{
|
||||||
|
trace("Font name to long to test: %s\n",(char *)efnd.elf[i].elfFullName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
lstrcpyA(lf.lfFaceName, (char *)efnd.elf[i].elfFullName);
|
lstrcpyA(lf.lfFaceName, (char *)efnd.elf[i].elfFullName);
|
||||||
font = CreateFontIndirectA(&lf);
|
font = CreateFontIndirectA(&lf);
|
||||||
oldfont = SelectObject(hdc, font);
|
oldfont = SelectObject(hdc, font);
|
||||||
|
|
Loading…
Reference in New Issue