This is a pretty obscure bug that’s not likely to come up much, but I discovered this today. It’s very easy to duplicate (I’m using build 894 for Windows), so I thought it would be worth reporting.
Here’s the code:
local test = display.newRect(50, 50, 10, 10)
test.x = 2000000000
test.x = 50
print (test.x)
Instead of printing 50, it prints 0. If we change the code to:
local test = display.newRect(50, 50, 10, 10)
test.x = 2000000000
test.x = 50
test.x = 50
print (test.x)
… the correct value now gets printed. [import]uid: 13621 topic_id: 31456 reply_id: 331456[/import]