aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_parse.c b/src/lj_parse.c
index 610c8614..5df4c6ec 100644
--- a/src/lj_parse.c
+++ b/src/lj_parse.c
@@ -2177,6 +2177,8 @@ static void assign_adjust(LexState *ls, BCReg nvars, BCReg nexps, ExpDesc *e)
2177 bcemit_nil(fs, reg, (BCReg)extra); 2177 bcemit_nil(fs, reg, (BCReg)extra);
2178 } 2178 }
2179 } 2179 }
2180 if (nexps > nvars)
2181 ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
2180} 2182}
2181 2183
2182/* Recursively parse assignment statement. */ 2184/* Recursively parse assignment statement. */
@@ -2210,8 +2212,6 @@ static void parse_assignment(LexState *ls, LHSVarList *lh, BCReg nvars)
2210 return; 2212 return;
2211 } 2213 }
2212 assign_adjust(ls, nvars, nexps, &e); 2214 assign_adjust(ls, nvars, nexps, &e);
2213 if (nexps > nvars)
2214 ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
2215 } 2215 }
2216 /* Assign RHS to LHS and recurse downwards. */ 2216 /* Assign RHS to LHS and recurse downwards. */
2217 expr_init(&e, VNONRELOC, ls->fs->freereg-1); 2217 expr_init(&e, VNONRELOC, ls->fs->freereg-1);