Commit ac6671b7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Fix response text conversion to WCHAR string.

parent ace3a81d
......@@ -865,7 +865,11 @@ static HRESULT WINAPI httprequest_get_responseText(IXMLHTTPRequest *iface, BSTR
if (encoding == XML_CHAR_ENCODING_UTF8 ||
encoding == XML_CHAR_ENCODING_NONE )
{
*body = bstr_from_xmlChar(ptr);
DWORD length = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)ptr, size, NULL, 0);
*body = SysAllocStringLen(NULL, length);
if (*body)
MultiByteToWideChar( CP_UTF8, 0, (LPCSTR)ptr, size, *body, length);
}
else
*body = SysAllocStringByteLen((LPCSTR)ptr, size);
......
......@@ -3354,7 +3354,7 @@ if (0)
* not what the server expects */
if(hr == S_OK)
{
todo_wine ok(!memcmp(bstrResponse, wszExpectedResponse, sizeof(wszExpectedResponse)),
ok(!memcmp(bstrResponse, wszExpectedResponse, sizeof(wszExpectedResponse)),
"expected %s, got %s\n", wine_dbgstr_w(wszExpectedResponse), wine_dbgstr_w(bstrResponse));
SysFreeString(bstrResponse);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment