lua-users home
lua-l archive

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


> !             /* 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