From a4e64ebf0e20b2c6f64872a11b00f97d72e55f77 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 22 Dec 2008 04:26:51 +0000 Subject: [PATCH] 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. svn path=/trunk/; revision=38262 --- reactos/subsystems/win32/win32k/objects/freetype.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/freetype.c b/reactos/subsystems/win32/win32k/objects/freetype.c index ffb27d5786d..97636614a5c 100644 --- a/reactos/subsystems/win32/win32k/objects/freetype.c +++ b/reactos/subsystems/win32/win32k/objects/freetype.c @@ -3132,6 +3132,7 @@ GreExtTextOutW( 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?). @@ -3158,6 +3159,8 @@ GreExtTextOutW( goto fail; } + DxShift = fuOptions & ETO_PDY ? 1 : 0; + if (PATH_IsPathOpen(dc->DcLevel)) { if (!PATH_ExtTextOut( dc, @@ -3364,7 +3367,7 @@ GreExtTextOutW( if (NULL != Dx) { Start = Count < 2 ? 0 : Count - 2; - TextWidth = Count < 2 ? 0 : (Dx[Count - 2] << 6); + TextWidth = Count < 2 ? 0 : (Dx[(Count-2)<