RE: Userdata with methods *and* table access.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: RE: Userdata with methods *and* table access.
- From: "Tom Spilman" <tom@...>
- Date: 2004年10月13日 19:16:44 -0500
> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of David Given
> Sent: Wednesday, October 13, 2004 4:44 PM
> To: Lua list
> Subject: Re: Userdata with methods *and* table access.
> * You musn't read past the end of the string, because you may
> overrun the memory block and cause a segmentation fault.
> That's why you need the if statement in the first example.
True, but could Lua ever pass an empty key to the __index metamethod?
Tom Spilman
Co-owner | Programmer
www.sickheadgames.com