Akihiro Sagawa : gdi32: Pass the byte count to FONT_mbtowc in GetCharABCWidthsA.

Alexandre Julliard julliard at winehq.org
Mon Jan 17 10:59:49 CST 2011


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

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Sun Jan 16 23:00:18 2011 +0900

gdi32: Pass the byte count to FONT_mbtowc in GetCharABCWidthsA.

---

 dlls/gdi32/font.c       |    2 +-
 dlls/gdi32/tests/font.c |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 5d47ca6..75a714b 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -2317,7 +2317,7 @@ BOOL WINAPI GetCharABCWidthsA(HDC hdc, UINT firstChar, UINT lastChar,
     }
     str[i] = '\0';
 
-    wstr = FONT_mbtowc(hdc, str, -1, &wlen, NULL);
+    wstr = FONT_mbtowc(hdc, str, i, &wlen, NULL);
     if (wstr == NULL)
     {
         HeapFree(GetProcessHeap(), 0, str);
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 5f3ecc8..eda7056 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -988,7 +988,6 @@ static void test_GetCharABCWidths(void)
         memset(full, 0xcc, sizeof full);
         ret = pGetCharABCWidthsA(hdc, 0x00, code, full);
         ok(ret, "GetCharABCWidthsA should have succeeded\n");
-        todo_wine
         ok(memcmp(&a[0], &full[code], sizeof(ABC)) == 0,
            "GetCharABCWidthsA info should match. codepage = %u\n", c[i].cs);
 




More information about the wine-cvs mailing list