Skip to content

Commit

Permalink
Merge branch 'master' into v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Pall committed Jun 27, 2016
2 parents 287a534 + aef4edd commit ce30766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lj_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,8 @@ static void assign_adjust(LexState *ls, BCReg nvars, BCReg nexps, ExpDesc *e)
bcemit_nil(fs, reg, (BCReg)extra);
}
}
if (nexps > nvars)
ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
}

/* Recursively parse assignment statement. */
Expand Down Expand Up @@ -2210,8 +2212,6 @@ static void parse_assignment(LexState *ls, LHSVarList *lh, BCReg nvars)
return;
}
assign_adjust(ls, nvars, nexps, &e);
if (nexps > nvars)
ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
}
/* Assign RHS to LHS and recurse downwards. */
expr_init(&e, VNONRELOC, ls->fs->freereg-1);
Expand Down

0 comments on commit ce30766

Please sign in to comment.