Author: tkreuzer
Date: Thu Dec 18 18:12:43 2008
New Revision: 38183
URL:
http://svn.reactos.org/svn/reactos?rev=38183&view=rev
Log:
Zero the last character in lfFaceName when converting a LOGFONT from A to W or vice versa.
Fixes 1 gdi32_winetest font.
DPRINT1 -> DPRINT
Modified:
trunk/reactos/dll/win32/gdi32/objects/font.c
trunk/reactos/dll/win32/gdi32/objects/utils.c
Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/fo…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] Thu Dec 18 18:12:43 2008
@@ -108,7 +108,7 @@
lenW = MultiByteToWideChar(cp, 0, str, count, NULL, 0);
strW = HeapAlloc(GetProcessHeap(), 0, lenW*sizeof(WCHAR));
MultiByteToWideChar(cp, 0, str, count, strW, lenW);
- DPRINT1("mapped %s -> %S\n", str, strW);
+ DPRINT("mapped %s -> %S\n", str, strW);
if(plenW) *plenW = lenW;
if(pCP) *pCP = cp;
return strW;
Modified: trunk/reactos/dll/win32/gdi32/objects/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/ut…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/utils.c [iso-8859-1] Thu Dec 18 18:12:43 2008
@@ -329,6 +329,7 @@
COPYN(lfQuality);
COPYN(lfPitchAndFamily);
COPYS(lfFaceName,LF_FACESIZE);
+ pW->lfFaceName[LF_FACESIZE - 1] = '\0';
#undef COPYN
#undef COPYS
@@ -355,6 +356,7 @@
COPYN(lfQuality);
COPYN(lfPitchAndFamily);
COPYS(lfFaceName,LF_FACESIZE);
+ pA->lfFaceName[LF_FACESIZE - 1] = '\0';
#undef COPYN
#undef COPYS