mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
Zero the last character in lfFaceName when converting a LOGFONT from A to W or vice versa. Fixes 1 gdi32_winetest font.
DPRINT1 -> DPRINT svn path=/trunk/; revision=38183
This commit is contained in:
parent
23eb0e8a4a
commit
fd478ccca5
2 changed files with 3 additions and 1 deletions
|
@ -108,7 +108,7 @@ static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW, UINT *pCP)
|
|||
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;
|
||||
|
|
|
@ -329,6 +329,7 @@ LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA)
|
|||
COPYN(lfQuality);
|
||||
COPYN(lfPitchAndFamily);
|
||||
COPYS(lfFaceName,LF_FACESIZE);
|
||||
pW->lfFaceName[LF_FACESIZE - 1] = '\0';
|
||||
|
||||
#undef COPYN
|
||||
#undef COPYS
|
||||
|
@ -355,6 +356,7 @@ LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)
|
|||
COPYN(lfQuality);
|
||||
COPYN(lfPitchAndFamily);
|
||||
COPYS(lfFaceName,LF_FACESIZE);
|
||||
pA->lfFaceName[LF_FACESIZE - 1] = '\0';
|
||||
|
||||
#undef COPYN
|
||||
#undef COPYS
|
||||
|
|
Loading…
Reference in a new issue