[ros-diffs] [tkreuzer] 40927: bmfd: HGLYPH is an ULONG. Use offset to glyph entry as HGLYPH instead of the pointer to fix 64bit build.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Fri May 15 14:24:01 CEST 2009


Author: tkreuzer
Date: Fri May 15 16:24:00 2009
New Revision: 40927

URL: http://svn.reactos.org/svn/reactos?rev=40927&view=rev
Log:
bmfd: HGLYPH is an ULONG. Use offset to glyph entry as HGLYPH instead of the pointer to fix 64bit build.

Modified:
    branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/font.c
    branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/glyph.c

Modified: branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/font.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/font.c?rev=40927&r1=40926&r2=40927&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/font.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/font.c [iso-8859-1] Fri May 15 16:24:00 2009
@@ -389,7 +389,7 @@
 {
     PBMFD_FILE pfile = (PBMFD_FILE)iFile;
     PBMFD_FACE pface;
-    ULONG i, j, cjOffset, cjSize, cGlyphs, cRuns;
+    ULONG i, j, cjSize, cGlyphs, cRuns;
     CHAR ch, chFirst, ach[256];
     WCHAR wc, awc[256];
     PFD_GLYPHSET pGlyphSet;
@@ -475,14 +475,13 @@
     pwcrun[0].wcLow = awc[0];
     pwcrun[0].cGlyphs = 1;
     pwcrun[0].phg = phglyphs;
-    phglyphs[0] = (HGLYPH)pface->pCharTable;
+    phglyphs[0] = 0;
 
     /* Walk through all supported chars */
     for (i = 1, j = 0; i < cGlyphs; i++)
     {
-        /* Use pointer to glyph entry as hglyph */
-        cjOffset = (ach[i] - chFirst) * pface->cjEntrySize;
-        phglyphs[i] = (HGLYPH)(pface->pCharTable + cjOffset);
+        /* Use offset to glyph entry as hglyph */
+        phglyphs[i] = (ach[i] - chFirst) * pface->cjEntrySize;
 
         /* Check whether we can append the wchar to a run */
         if (awc[i] == awc[i - 1] + 1)

Modified: branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/glyph.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/glyph.c?rev=40927&r1=40926&r2=40927&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/glyph.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/glyph.c [iso-8859-1] Fri May 15 16:24:00 2009
@@ -80,7 +80,7 @@
     ULONG cjSize)
 {
     PBMFD_FACE pface = pfont->pface;
-    PGLYPHENTRY pge = (PGLYPHENTRY)hg;
+    PGLYPHENTRY pge = (PGLYPHENTRY)(pface->pCharTable + hg);
     ULONG xSrc, ySrc, cxSrc, cySrc;
     ULONG xDst, yDst, cxDst, cyDst;
     ULONG xScale, yScale;



More information about the Ros-diffs mailing list