msxml3: Remove superflous re-conversion from wide chars to utf8.

This commit is contained in:
Michael Karcher 2008-10-11 23:58:27 +02:00 committed by Alexandre Julliard
parent adab2e5701
commit 0803167ff0
1 changed files with 4 additions and 12 deletions

View File

@ -601,25 +601,17 @@ static HRESULT WINAPI domcomment_appendData(
/* Older versions of libxml < 2.6.27 didn't correctly support /* Older versions of libxml < 2.6.27 didn't correctly support
xmlTextConcat on Comment nodes. Fallback to setting the xmlTextConcat on Comment nodes. Fallback to setting the
contents directly if xmlTextConcat fails. contents directly if xmlTextConcat fails.
NOTE: if xmlTextConcat fails, pContent is destroyed.
*/ */
if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0) if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0)
hr = S_OK; hr = S_OK;
else else
{ {
xmlChar *pNew; xmlChar *pNew;
pContent = xmlChar_from_wchar( (WCHAR*)p ); pNew = xmlStrcat(xmlNodeGetContent(pDOMNode->node), pContent);
if(pContent) if(pNew)
{ {
pNew = xmlStrcat(xmlNodeGetContent(pDOMNode->node), pContent); xmlNodeSetContent(pDOMNode->node, pNew);
if(pNew) hr = S_OK;
{
xmlNodeSetContent(pDOMNode->node, pNew);
hr = S_OK;
}
else
hr = E_FAIL;
} }
else else
hr = E_FAIL; hr = E_FAIL;