Author: cwittich
Date: Sun Mar 21 12:14:47 2010
New Revision: 46293
URL:
http://svn.reactos.org/svn/reactos?rev=46293&view=rev
Log:
[MSXML3]
sync msxml3 to wine 1.1.41
Modified:
trunk/reactos/dll/win32/msxml3/domdoc.c
Modified: trunk/reactos/dll/win32/msxml3/domdoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] Sun Mar 21 12:14:47 2010
@@ -1650,19 +1650,20 @@
static BOOL bstr_to_utf8( BSTR bstr, char **pstr, int *plen )
{
- UINT len, blen = SysStringLen( bstr );
+ UINT len;
LPSTR str;
- len = WideCharToMultiByte( CP_UTF8, 0, bstr, blen, NULL, 0, NULL, NULL );
+ len = WideCharToMultiByte( CP_UTF8, 0, bstr, -1, NULL, 0, NULL, NULL );
str = heap_alloc( len );
if ( !str )
return FALSE;
- WideCharToMultiByte( CP_UTF8, 0, bstr, blen, str, len, NULL, NULL );
+ WideCharToMultiByte( CP_UTF8, 0, bstr, -1, str, len, NULL, NULL );
*plen = len;
*pstr = str;
return TRUE;
}
+/* don't rely on data to be in BSTR format, treat it as WCHAR string */
static HRESULT WINAPI domdoc_loadXML(
IXMLDOMDocument2 *iface,
BSTR bstrXML,