aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ldebug.c b/ldebug.c
index dde4669e..30a28828 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -301,7 +301,14 @@ static void collectvalidlines (lua_State *L, Closure *f) {
301 sethvalue2s(L, L->top, t); /* push it on stack */ 301 sethvalue2s(L, L->top, t); /* push it on stack */
302 api_incr_top(L); 302 api_incr_top(L);
303 setbtvalue(&v); /* boolean 'true' to be the value of all indices */ 303 setbtvalue(&v); /* boolean 'true' to be the value of all indices */
304 for (i = 0; i < p->sizelineinfo; i++) { /* for all instructions */ 304 if (!p->is_vararg) /* regular function? */
305 i = 0; /* consider all instructions */
306 else { /* vararg function */
307 lua_assert(p->code[0] == OP_VARARGPREP);
308 currentline = nextline(p, currentline, 0);
309 i = 1; /* skip first instruction (OP_VARARGPREP) */
310 }
311 for (; i < p->sizelineinfo; i++) { /* for each instruction */
305 currentline = nextline(p, currentline, i); /* get its line */ 312 currentline = nextline(p, currentline, i); /* get its line */
306 luaH_setint(L, t, currentline, &v); /* table[line] = true */ 313 luaH_setint(L, t, currentline, &v); /* table[line] = true */
307 } 314 }