msxml3: Remove superflous re-conversion from wide chars to utf8.
authorMichael Karcher <wine@mkarcher.dialup.fu-berlin.de>
Sat, 11 Oct 2008 21:58:27 +0000 (23:58 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 13 Oct 2008 09:52:05 +0000 (11:52 +0200)
dlls/msxml3/comment.c

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