[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: snapshot of Lua 4.1 (work)
- From: Roberto Ierusalimschy <rieru@...>
- Date: Mon, 12 Nov 2001 10:10:05 -0600 (CST)
On Sat, 10 Nov 2001, Peter Shook wrote:
>
> I've noticed a little problem with my common debug idiom of
> foreach(t,print)
> Here is the difference between 4.1 alpha and beta:
>
> [...]
This is a silly bug in the implementation of next :-( The correction is
trivial (I hope):
ltable.c:99 (luaH_index)
if (0 <= i && i < t->sizearray) { /* is `key' inside array part? */
< return i; /* yes; that's the index */
---
> return i-1; /* yes; that's the index (corrected to C) */
}
Thank you for the report.
-- Roberto