- Patch by Thomas Faber: GetTextExtentPoint32 must not assume null termination of lpString.

svn path=/trunk/; revision=51147
This commit is contained in:
James Tabor 2011-03-26 02:10:04 +00:00
parent 6af9026458
commit b294b7d774

View file

@ -261,7 +261,8 @@ GetTextExtentPoint32A(
UNICODE_STRING StringU;
BOOL ret;
RtlInitAnsiString(&StringA, (LPSTR)lpString);
StringA.Buffer = (LPSTR)lpString;
StringA.Length = cchString;
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
ret = GetTextExtentPoint32W(hdc, StringU.Buffer, cchString, lpSize);