|
Roberto Ierusalimschy wrote:
In the second picture, it may really be a small bug. When the table has no hash elements, t->node points to 'dummynode' but t->lastfree also points to dummynode (because size is 0). Then the decrement in the marked line [while (t->lastfree-- > t->node) {] will make t->lastfree point to outside the dummynode_ "array".
Funny, I'm in the process of going through that code right now in an effort to play around a bit with putting some of the Lua libraries into ROM. I guess one way to fix this is to have two dummynode entries in an array and point t->node at the first one and t->lasfree point at the second one... Ralph