diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index e7625aa9..5a392899 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -968,14 +968,12 @@ void BfCompiler::EmitTestMethod(BfVDataModule* bfModule, Array& test if (fieldDef->mName == "Name") { String* str = bfModule->GetStringPoolString(field.mParam.mValue, typeInstance->mConstHolder); - testMethod.mName += "Name"; - String* temp = new String(*str); - temp->Replace('\t', "\\t"); //Good enough for now - temp->Replace('\n', "\\n"); - temp->Replace('\a', "\\a"); - temp->Replace('\v', "\\v"); - testMethod.mName += *temp; - testMethod.mName += "\a"; + if (str != NULL) + { + testMethod.mName += "Name"; + testMethod.mName += SlashString(*str, true, true, true);; + testMethod.mName += '\a'; + } } } }