Author: tkreuzer Date: Sun Dec 21 22:26:51 2008 New Revision: 38262
URL: http://svn.reactos.org/svn/reactos?rev=38262&view=rev Log: If ETO_PDY is specified, Dx is a pair of INTs, make sure we access the correct index. based on aspotashev's patch. Should fix bug #3958 See issue #3958 for more details.
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Sun Dec 21 22:26:51 2008 @@ -3132,6 +3132,7 @@ POINT Start; BOOL DoBreak = FALSE; HPALETTE hDestPalette; + USHORT DxShift;
// TODO: Write test-cases to exactly match real Windows in different // bad parameters (e.g. does Windows check the DC or the RECT first?). @@ -3157,6 +3158,8 @@ SetLastWin32Error(ERROR_INVALID_PARAMETER); goto fail; } + + DxShift = fuOptions & ETO_PDY ? 1 : 0;
if (PATH_IsPathOpen(dc->DcLevel)) { @@ -3364,7 +3367,7 @@ if (NULL != Dx) { Start = Count < 2 ? 0 : Count - 2; - TextWidth = Count < 2 ? 0 : (Dx[Count - 2] << 6); + TextWidth = Count < 2 ? 0 : (Dx[(Count-2)<<DxShift] << 6); } else { @@ -3597,7 +3600,7 @@ } else { - TextLeft += Dx[i] << 6; + TextLeft += Dx[i<<DxShift] << 6; // DbgPrint("new TextLeft2: %d\n", TextLeft); } previous = glyph_index;