mirror of
https://github.com/lua/lua
synced 2024-11-22 04:41:23 +03:00
Wrong assert in 'collectvalidlines'
This commit is contained in:
parent
6b3e116d44
commit
48835c76c8
2
ldebug.c
2
ldebug.c
@ -304,7 +304,7 @@ static void collectvalidlines (lua_State *L, Closure *f) {
|
||||
if (!p->is_vararg) /* regular function? */
|
||||
i = 0; /* consider all instructions */
|
||||
else { /* vararg function */
|
||||
lua_assert(p->code[0] == OP_VARARGPREP);
|
||||
lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP);
|
||||
currentline = nextline(p, currentline, 0);
|
||||
i = 1; /* skip first instruction (OP_VARARGPREP) */
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ do -- testing active lines
|
||||
-- 5th line is empty
|
||||
end, {3, 4, 6})
|
||||
|
||||
checkactivelines(function (...) end, {0})
|
||||
checkactivelines(function (a, b, ...) end, {0})
|
||||
|
||||
checkactivelines(function (a, b)
|
||||
end, {1})
|
||||
|
Loading…
Reference in New Issue
Block a user