[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: one more thing..
- From: "Adam D. Moss" <adam@...>
- Date: Thu, 02 Sep 2004 12:57:43 +0100
Asko Kauppi wrote:
It's deep down in the code, but this is what catches it:
local n= table.getn(tbl)
if (n>0 and (not tbl[n])) then -- BUG TRAPPING in Lua5.1w1 !!!
print( "TWN:", n, tbl.n )
TWN: 2 nil
I'm pretty sure (as was mentioned some time in the past) that
the 'n' index no longer literally exists in the table (thank
goodness!). getn/setn now keep the table->'n' mapping somewhere
private (or not-so-private -- perhaps the registry -- but at
least this stops tables being implicitly polluted with 'n').