[GDI32] Fix ExtTextOutA with ETO_GLYPH_INDEX

CORE-18365
This commit is contained in:
Mark Jansen 2022-09-14 20:53:04 +02:00
parent 75125228be
commit d84b76a69e
No known key found for this signature in database
GPG Key ID: B39240EE84BEAE8B

View File

@ -465,9 +465,16 @@ ExtTextOutA(
UNICODE_STRING StringU;
BOOL ret;
RtlInitAnsiString(&StringA, (LPSTR)lpString);
if (fuOptions & ETO_GLYPH_INDEX)
return ExtTextOutW(hdc, x, y, fuOptions, lprc, (LPCWSTR)lpString, cch, lpDx);
StringA.Buffer = (PCHAR)lpString;
StringA.Length = StringA.MaximumLength = cch;
RtlAnsiStringToUnicodeString(&StringU, &StringA, TRUE);
if (StringU.Length != StringA.Length * sizeof(WCHAR))
DPRINT1("ERROR: Should convert lpDx properly!\n");
ret = ExtTextOutW(hdc, x, y, fuOptions, lprc, StringU.Buffer, cch, lpDx);
RtlFreeUnicodeString(&StringU);