bugfix! Missing error check in argument parsing routine
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
|
||||
fun add(a: int | float = 1, b = 8)
|
||||
return a + b;
|
||||
|
||||
c = add(3, 4);
|
||||
|
||||
assert(c == 7);
|
||||
|
||||
print(c);
|
||||
@@ -2023,6 +2023,8 @@ static Node *parse_function_definition(Context *ctx)
|
||||
|
||||
int argc = 0; // Initialization for the warning.
|
||||
Node *argv = parse_function_arguments(ctx, &argc);
|
||||
if(argv == NULL)
|
||||
return NULL;
|
||||
|
||||
if(done(ctx))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user