jserv / MazuCC

A minimalist C compiler with x86_64 code generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate lines

backman-git opened this issue · comments

static Ast *ast_for(Ast *init, Ast *cond, Ast *step, Ast *body)
{
    Ast *r = malloc(sizeof(Ast));
    r->type = AST_FOR;
    r->ctype = NULL;
    r->forinit = init;
    r->forcond = cond;
    r->forstep = step;
    r->forstep = step;
    r->forbody = body;
    return r;
}

Is there a duplicated line: "r->forstep = step;"?

Thank @backman-git for reporting. Fixed.