mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Test name leak and slash fix
This commit is contained in:
parent
c3b8fdf794
commit
d53613c303
1 changed files with 6 additions and 8 deletions
|
@ -968,14 +968,12 @@ void BfCompiler::EmitTestMethod(BfVDataModule* bfModule, Array<TestMethod>& 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';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue