[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] patch-lua-5.1.3
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 8 May 2008 13:12:44 -0300
> ! /* check that it does not jump to a setlist count; this
> ! is tricky, because the count from a previous setlist may
> ! have the same value of an invalid setlist; so, we must
> ! go all the way back to the first of them (if any) */
> ! for (j = 0; j < dest; j++) {
> ! Instruction d = pt->code[dest-1];
> ! if (!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)) break;
> ! }
>
> Either I'm not looking at it right, or the for-loop body doesn't
> reference the j variable
Sorry about that. It should be
! Instruction d = pt->code[dest-1-j];
(It is tricky to create a test to exercise this case.)
-- Roberto