lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > For this code, if LUAI_ASSERT is activated, it will raise an assertion.
> > 
> > > local function test(x,...)
> > >    debug.getinfo(1, "L")
> > > end
> > > test()
> 
> Thanks for the feedback.

Of course, the assert should be this:

-      lua_assert(p->code[0] == OP_VARARGPREP);
+      lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP);

The tests were using only vararg functions with no extra parameters,
in which case the operand in OP_VARARGPREP is zero.

-- Roberto