[GDI32]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 19 Apr 2017 10:33:58 +0000 (10:33 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 19 Apr 2017 10:33:58 +0000 (10:33 +0000)
- Use the number of WCHARs, not the number of ANSI chars in GetCharABCWidthsA. Fixes stack corruption when running gdi32_winetest:font
CORE-11474

svn path=/trunk/; revision=74372

reactos/win32ss/gdi/gdi32/objects/font.c

index 98cf615..6a9a906 100644 (file)
@@ -830,7 +830,7 @@ GetCharABCWidthsA(
 
     ret = NtGdiGetCharABCWidthsW( hdc,
                                   wstr[0],
-                                  (ULONG)count,
+                                  wlen - 1,
                                   (PWCHAR)wstr,
                                   GCABCW_NOFLOAT,
                                   (PVOID)lpabc);