Closed jimbauwens closed 12 years ago
In strange cases 'i' is a string. i + 1 becomes a string operation, and doesn't work as expected.
This causes tables to get corrupted.
Example lua script that suffers from this:
a = {1,2,3,4,5,6,7,8,9} a[1] = 1337
for i=1, 9 do print(a[i]) end
This will print 1337 null null null null null ..
Thanks for the report, the bug has been fixed in f59409c88bdcf9b38964f2cdbeff1c158a6a65a5. I went with a slightly different solution for code size reasons, but the suggested fix was helpful, thanks again.
In strange cases 'i' is a string. i + 1 becomes a string operation, and doesn't work as expected.
This causes tables to get corrupted.
Example lua script that suffers from this:
a = {1,2,3,4,5,6,7,8,9} a[1] = 1337
for i=1, 9 do print(a[i]) end
This will print 1337 null null null null null ..