Aric Stewart : wineps.drv: Handle empty strings when building vertical runs .

Alexandre Julliard julliard at winehq.org
Thu Aug 15 13:12:46 CDT 2013


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

Author: Aric Stewart <aric at codeweavers.com>
Date:   Fri Aug  9 12:36:16 2013 -0500

wineps.drv: Handle empty strings when building vertical runs.

---

 dlls/wineps.drv/text.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wineps.drv/text.c b/dlls/wineps.drv/text.c
index 1a54510..a9623a1 100644
--- a/dlls/wineps.drv/text.c
+++ b/dlls/wineps.drv/text.c
@@ -91,15 +91,16 @@ static BOOL check_unicode_tategaki(WCHAR uchar)
 
 static Run* build_vertical_runs(PHYSDEV dev, UINT flags, LPCWSTR str, UINT count, INT *run_count)
 {
-    BOOL last_vert = check_unicode_tategaki(str[0]);
+    BOOL last_vert;
     INT start, end;
     INT array_size = 5;
     Run *run = HeapAlloc(GetProcessHeap(),0,sizeof(Run)*array_size);
     int index = 0;
     LOGFONTW lf;
 
-    if ((!(flags & ETO_GLYPH_INDEX)) && GetObjectW( GetCurrentObject(dev->hdc, OBJ_FONT), sizeof(lf), &lf ) && (lf.lfFaceName[0] == '@'))
+    if (count && str && (!(flags & ETO_GLYPH_INDEX)) && GetObjectW( GetCurrentObject(dev->hdc, OBJ_FONT), sizeof(lf), &lf ) && (lf.lfFaceName[0] == '@'))
     {
+        last_vert = check_unicode_tategaki(str[0]);
         start = end = 0;
         while (start < count)
         {




More information about the wine-cvs mailing list