Windows build fix following r69806.
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Oct 2010 21:56:25 +0000 (21:56 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Oct 2010 21:56:25 +0000 (21:56 +0000)
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::markupToCFHTML):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/win/ClipboardUtilitiesWin.cpp

index 137c5e2..ed5a9c8 100644 (file)
@@ -1,3 +1,10 @@
+2010-10-14  Gavin Barraclough  <barraclough@apple.com>
+
+        Windows build fix following r69806.
+
+        * platform/win/ClipboardUtilitiesWin.cpp:
+        (WebCore::markupToCFHTML):
+
 2010-10-14  Zhenyao Mo  <zmo@google.com>
 
         Reviewed by Kenneth Russell.
index 815a0aa..f8da764 100644 (file)
@@ -240,7 +240,10 @@ void markupToCFHTML(const String& markup, const String& srcURL, Vector<char>& re
     unsigned endFragmentOffset = startFragmentOffset + markupUTF8.length();
     unsigned endHTMLOffset = endFragmentOffset + strlen(endMarkup);
 
-    append(result, makeString(header, startHTMLOffset, endHTMLOffset, startFragmentOffset, endFragmentOffset).utf8());
+    unsigned headerBufferLength = startHTMLOffset + 1; // + 1 for '\0' terminator.
+    char headerBuffer[headerBufferLength];
+    snprintf(headerBuffer, headerBufferLength, header, startHTMLOffset, endHTMLOffset, startFragmentOffset, endFragmentOffset);
+    append(result, CString(headerBuffer));
     if (sourceURLUTF8.length()) {
         append(result, sourceURLPrefix);
         append(result, sourceURLUTF8);