Alexandre Julliard : winex11.drv: Glyph width is rounded to 32 bits, make sure to provide enough null data.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 13 06:13:55 CDT 2007


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 12 16:51:31 2007 +0200

winex11.drv: Glyph width is rounded to 32 bits, make sure to provide enough null data.

---

 dlls/winex11.drv/xrender.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 74a7e2b..1e196a7 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -633,7 +633,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
     gsCacheEntryFormat *formatEntry;
     UINT ggo_format = GGO_GLYPH_INDEX;
     XRenderPictFormat pf;
-    const char zero = 0;
+    static const char zero[4];
 
     switch(format) {
     case AA_Grey:
@@ -822,7 +822,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
 
         wine_tsx11_lock();
 	pXRenderAddGlyphs(gdi_display, formatEntry->glyphset, &gid, &gi, 1,
-			  buflen ? buf : &zero, buflen ? buflen : 1);
+                          buflen ? buf : zero, buflen ? buflen : sizeof(zero));
 	wine_tsx11_unlock();
 	HeapFree(GetProcessHeap(), 0, buf);
     } else {




More information about the wine-cvs mailing list