Posted 23 February 2016 - 05:06 AM
The bug can be seen with this sample program.
I'm thinking that inserting a table into another for a specific number of time (2 for demonstration,) and putting that into another table twice, would create a matrix that I can modify a single piece of. And obviously something is wrong since four H's are in the table. So I think this is a bug, but it might just be me doing something wrongly.
P.S. - Using table.insert() instead of table[a] has the same effect
local table1 = {" ",1}
local table2 = {}
for a = 1, 2 do
table2[a] = table1
end
local table3 = {}
for a = 1, 2 do
table3[a] = table2
end
table3[1][1][1] = "H"
print(table3[2][1][1]) -- prints "H"
print(table3[1][2][1]) -- prints "H"
print(table3[2][2][1]) -- prints "H"
I don't know if this bug was discovered before, but I couldn't find anything about it in the bugs forums.I'm thinking that inserting a table into another for a specific number of time (2 for demonstration,) and putting that into another table twice, would create a matrix that I can modify a single piece of. And obviously something is wrong since four H's are in the table. So I think this is a bug, but it might just be me doing something wrongly.
P.S. - Using table.insert() instead of table[a] has the same effect