Invalid assert

54 views
Skip to first unread message

Jure Bagić

unread,
Dec 4, 2025, 4:54:11 PM (12 days ago) Dec 4
to lua-l
I think this is invalid assert in lcode.c:1373 'luaK_indexed' function:
> ...
> else if (t->k == VVARGVAR) { /* indexing the vararg parameter? */
> lua_assert(t->u.ind.t == fs->f->numparams);
> t->u.ind.t = cast_byte(t->u.var.ridx);
> ...

This was probably intended:
> lua_assert(t->u.var.ridx == fs->f->numparams);

-- Jure
signature.asc

Roberto Ierusalimschy

unread,
Dec 5, 2025, 11:51:58 AM (11 days ago) Dec 5
to lu...@googlegroups.com
Indeed. Thanks for the feedback.

-- Roberto
Reply all
Reply to author
Forward
0 new messages