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 2a601f1d..6b5f12fb 100644
--- a/src/lj_parse.c
+++ b/src/lj_parse.c
@@ -2207,6 +2207,8 @@ static void assign_adjust(LexState *ls, BCReg nvars, BCReg nexps, ExpDesc *e)
2207 bcemit_nil(fs, reg, (BCReg)extra); 2207 bcemit_nil(fs, reg, (BCReg)extra);
2208 } 2208 }
2209 } 2209 }
2210 if (nexps > nvars)
2211 ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
2210} 2212}
2211 2213
2212/* Recursively parse assignment statement. */ 2214/* Recursively parse assignment statement. */
@@ -2240,8 +2242,6 @@ static void parse_assignment(LexState *ls, LHSVarList *lh, BCReg nvars)
2240 return; 2242 return;
2241 } 2243 }
2242 assign_adjust(ls, nvars, nexps, &e); 2244 assign_adjust(ls, nvars, nexps, &e);
2243 if (nexps > nvars)
2244 ls->fs->freereg -= nexps - nvars; /* Drop leftover regs. */
2245 } 2245 }
2246 /* Assign RHS to LHS and recurse downwards. */ 2246 /* Assign RHS to LHS and recurse downwards. */
2247 expr_init(&e, VNONRELOC, ls->fs->freereg-1); 2247 expr_init(&e, VNONRELOC, ls->fs->freereg-1);