Aric Stewart : usp10/tests: Catch case where enumerated font name is too long.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 1 10:57:01 CDT 2015


Module: wine
Branch: master
Commit: 0072188b69df43460d213f12efe06bb17720de93
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0072188b69df43460d213f12efe06bb17720de93

Author: Aric Stewart <aric at codeweavers.com>
Date:   Fri Sep 25 10:11:26 2015 -0500

usp10/tests: Catch case where enumerated font name is too long.

Signed-off-by: Aric Stewart <aric at codeweavers.com>

---

 dlls/usp10/tests/usp10.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 0db98d9..92b17c5 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -1993,6 +1993,11 @@ static void test_ScriptGetFontProperties(HDC hdc)
 
     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);
         font = CreateFontIndirectA(&lf);
         oldfont = SelectObject(hdc, font);
@@ -2034,6 +2039,11 @@ static void test_ScriptGetFontProperties(HDC hdc)
 
     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);
         font = CreateFontIndirectA(&lf);
         oldfont = SelectObject(hdc, font);




More information about the wine-cvs mailing list