- fixed a memory leak in the compiler.

- removed test Printfs.
This commit is contained in:
Christoph Oelckers 2016-11-10 13:37:38 +01:00
commit e0bd6a2c0a
6 changed files with 7 additions and 80 deletions

View file

@ -2839,10 +2839,14 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
}
else if (args->Size() == 1)
{
auto arg = (*args)[0];
(*args)[0] = nullptr;
delete args;
return new FxReturnStatement((*args)[0], *ast);
}
else
{
delete args;
Error(ast, "Return with multiple values not implemented yet.");
return new FxReturnStatement(nullptr, *ast);
}