b8284a1
diff -up 0ad-0.0.11-alpha/libraries/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp.orig 0ad-0.0.11-alpha/libraries/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp
b8284a1
--- 0ad-0.0.11-alpha/libraries/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp.orig	2012-09-08 09:56:56.532955316 -0300
b8284a1
+++ 0ad-0.0.11-alpha/libraries/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp	2012-09-08 09:57:27.200987159 -0300
b8284a1
@@ -523,8 +523,13 @@ bool FArchiveXML::EndExport(fm::vector
b8284a1
 	xmlOutputBufferPtr buf = xmlAllocOutputBuffer(NULL);
b8284a1
 	xmlNodeDumpOutput(buf, rootNode->doc, rootNode, 0, 0, NULL);
b8284a1
 
b8284a1
-	outData.resize(buf->buffer->use * sizeof(xmlChar));
b8284a1
-	memcpy(outData.begin(), buf->buffer->content, outData.size());
b8284a1
+#ifdef  LIBXML2_NEW_BUFFER
b8284a1
+	outData.resize(xmlOutputBufferGetSize(buf) * sizeof(xmlChar));
b8284a1
+	memcpy(outData.begin(), xmlOutputBufferGetContent(buf), outData.size());
b8284a1
+#else
b8284a1
+	outData.resize(buf->buffer->use * sizeof(xmlChar));
b8284a1
+	memcpy(outData.begin(), buf->buffer->content, outData.size());
b8284a1
+#endif
b8284a1
 
b8284a1
 	xmlOutputBufferClose(buf);
b8284a1
 	daeDocument.ReleaseXmlData();