[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: semantics of luaM_growvector?
- From: Paul Du Bois <paul.dubois@...>
- Date: Sun, 9 Jan 2005 15:47:08 -0800
luaM_growvector(ls->L, f->kproto, f->nkproto, 1, Proto *, "constant
table overflow", MAXARG_A);
In 4.0.1, this call allows kproto to grow until it has MAXARG_A-1
elements. I can interpret it a few ways:
- f->kproto should be able to grow to MAXARG_A, and luaM_growvectors
has a mostly-benign off-by-1 bug (it should allow vectors to grow to
limit and not limit-1)
- f->kproto should be able to grow to MAXARG_A, and the code should
pass MAXARG_A+1
- my intuition is incorrect, and f->kproto really should only be able
to grow to MAXARG_A-1
Which is it? I bet it's #3 :-)
p