Troy Rollo : gdi: Fix GetTextExentExPointW to return values consistent with GetTextExtentPointW .

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 5 15:24:08 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 73c7420c5a48d5810f30ffdca59dc36c806b4bf5
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=73c7420c5a48d5810f30ffdca59dc36c806b4bf5

Author: Troy Rollo <wine at troy.rollo.name>
Date:   Tue May  2 13:49:22 2006 +1000

gdi: Fix GetTextExentExPointW to return values consistent with GetTextExtentPointW.

---

 dlls/gdi/font.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/gdi/font.c b/dlls/gdi/font.c
index 7d8782a..817f706 100644
--- a/dlls/gdi/font.c
+++ b/dlls/gdi/font.c
@@ -1239,12 +1239,12 @@ BOOL WINAPI GetTextExtentExPointW( HDC h
     size->cx = size->cy = nFit = extent = 0;
     for(index = 0; index < count; index++)
     {
- 	if(!GetTextExtentPoint32W( hdc, str, 1, &tSize )) goto done;
+ 	if(!GetTextExtentPoint32W( hdc, str, index + 1, &tSize )) goto done;
         /* GetTextExtentPoint includes intercharacter spacing. */
         /* FIXME - justification needs doing yet.  Remember that the base
          * data will not be in logical coordinates.
          */
-	extent += tSize.cx;
+	extent = tSize.cx;
 	if( !lpnFit || extent <= maxExt )
         /* It is allowed to be equal. */
         {
@@ -1252,7 +1252,6 @@ BOOL WINAPI GetTextExtentExPointW( HDC h
 	    if( alpDx ) alpDx[index] = extent;
         }
 	if( tSize.cy > size->cy ) size->cy = tSize.cy;
-	str++;
     }
     size->cx = extent;
     if(lpnFit) *lpnFit = nFit;




More information about the wine-cvs mailing list