- fixed a memory leak in the compiler.
- removed test Printfs.
This commit is contained in:
parent
5151547df0
commit
e0bd6a2c0a
6 changed files with 7 additions and 80 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue