lua-users home
lua-l archive

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

on Lua 5.1-work1:

I'm facing a weird situation, where 'table.getn({})' gives 2!

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 )
        error "TRAPPED!"

TWN:    2       nil