From c4eb04bb8cc7452bf60abdf5a55b9c7a6576e650 Mon Sep 17 00:00:00 2001 From: Madrich Date: Sat, 14 Mar 2015 20:52:53 +0100 Subject: [PATCH] Fix XFile name for $ and {} Memleak copy constructor --- code/Exporter.cpp | 10 ++++------ code/XFileExporter.cpp | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/Exporter.cpp b/code/Exporter.cpp index 74b6a7344..203070f8f 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -495,13 +495,11 @@ void Exporter :: UnregisterExporter(const char* id) ExportProperties :: ExportProperties() {} ExportProperties::ExportProperties(const ExportProperties &other) + : mIntProperties(other.mIntProperties), + mFloatProperties(other.mFloatProperties), + mStringProperties(other.mStringProperties), + mMatrixProperties(other.mMatrixProperties) { - new(this) ExportProperties(); - - mIntProperties = other.mIntProperties; - mFloatProperties = other.mFloatProperties; - mStringProperties = other.mStringProperties; - mMatrixProperties = other.mMatrixProperties; } diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index 981d8a4c1..ce87f3168 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -510,6 +510,9 @@ std::string XFileExporter::toXFileString(aiString &name) std::string str = std::string(name.C_Str()); std::replace(str.begin(), str.end(), '<', '_'); std::replace(str.begin(), str.end(), '>', '_'); + std::replace(str.begin(), str.end(), '{', '_'); + std::replace(str.begin(), str.end(), '}', '_'); + std::replace(str.begin(), str.end(), '$', '_'); return str; }