{"action":"created","issue":{"url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/1519","repository_url":"https://api.github.com/repos/microsoft/pxt-arcade","labels_url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/1519/labels{/name}","comments_url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/1519/comments","events_url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/1519/events","html_url":"https://github.com/microsoft/pxt-arcade/issues/1519","id":534309845,"node_id":"MDU6SXNzdWU1MzQzMDk4NDU=","number":1519,"title":"invalid hardware compilation for Warehouse","user":{"login":"mmoskal","id":10673976,"node_id":"MDQ6VXNlcjEwNjczOTc2","avatar_url":"https://avatars1.githubusercontent.com/u/10673976?v=4","gravatar_id":"","url":"https://api.github.com/users/mmoskal","html_url":"https://github.com/mmoskal","followers_url":"https://api.github.com/users/mmoskal/followers","following_url":"https://api.github.com/users/mmoskal/following{/other_user}","gists_url":"https://api.github.com/users/mmoskal/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoskal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoskal/subscriptions","organizations_url":"https://api.github.com/users/mmoskal/orgs","repos_url":"https://api.github.com/users/mmoskal/repos","events_url":"https://api.github.com/users/mmoskal/events{/privacy}","received_events_url":"https://api.github.com/users/mmoskal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mmoskal","id":10673976,"node_id":"MDQ6VXNlcjEwNjczOTc2","avatar_url":"https://avatars1.githubusercontent.com/u/10673976?v=4","gravatar_id":"","url":"https://api.github.com/users/mmoskal","html_url":"https://github.com/mmoskal","followers_url":"https://api.github.com/users/mmoskal/followers","following_url":"https://api.github.com/users/mmoskal/following{/other_user}","gists_url":"https://api.github.com/users/mmoskal/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoskal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoskal/subscriptions","organizations_url":"https://api.github.com/users/mmoskal/orgs","repos_url":"https://api.github.com/users/mmoskal/repos","events_url":"https://api.github.com/users/mmoskal/events{/privacy}","received_events_url":"https://api.github.com/users/mmoskal/received_events","type":"User","site_admin":false},"assignees":[{"login":"mmoskal","id":10673976,"node_id":"MDQ6VXNlcjEwNjczOTc2","avatar_url":"https://avatars1.githubusercontent.com/u/10673976?v=4","gravatar_id":"","url":"https://api.github.com/users/mmoskal","html_url":"https://github.com/mmoskal","followers_url":"https://api.github.com/users/mmoskal/followers","following_url":"https://api.github.com/users/mmoskal/following{/other_user}","gists_url":"https://api.github.com/users/mmoskal/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoskal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoskal/subscriptions","organizations_url":"https://api.github.com/users/mmoskal/orgs","repos_url":"https://api.github.com/users/mmoskal/repos","events_url":"https://api.github.com/users/mmoskal/events{/privacy}","received_events_url":"https://api.github.com/users/mmoskal/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2019-12-06T23:40:03Z","updated_at":"2019-12-06T23:49:30Z","closed_at":null,"author_association":"MEMBER","body":"**Describe the bug**\r\nThe warehouse game doesn't work properly on hardware.\r\n\r\nSo far I narrowed it down to the following\r\n\r\n```typescript\r\nfunction testIt() {\r\n    let s = sprites.create(img`1 1`)\r\n    let right = true\r\n    let hbox = new game.Hitbox(s, 4, 0, 0, 0)\r\n    let tileScale = 3\r\n    let x0 = 14\r\n\r\n    s._x = Fx.sub(\r\n        right ?\r\n            Fx.sub(\r\n                Fx8(x0 << tileScale),\r\n                hbox.width\r\n            )\r\n            :\r\n            Fx8((x0 + 1) << tileScale),\r\n        hbox.ox\r\n    );\r\n\r\n    console.log(s._x)\r\n}\r\n\r\ngame.consoleOverlay.setVisible(true)\r\ntestIt()\r\n```\r\n\r\nThis shows 27648 in sim and NaN on hardware.\r\n"},"comment":{"url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/comments/562785355","html_url":"https://github.com/microsoft/pxt-arcade/issues/1519#issuecomment-562785355","issue_url":"https://api.github.com/repos/microsoft/pxt-arcade/issues/1519","id":562785355,"node_id":"MDEyOklzc3VlQ29tbWVudDU2Mjc4NTM1NQ==","user":{"login":"mmoskal","id":10673976,"node_id":"MDQ6VXNlcjEwNjczOTc2","avatar_url":"https://avatars1.githubusercontent.com/u/10673976?v=4","gravatar_id":"","url":"https://api.github.com/users/mmoskal","html_url":"https://github.com/mmoskal","followers_url":"https://api.github.com/users/mmoskal/followers","following_url":"https://api.github.com/users/mmoskal/following{/other_user}","gists_url":"https://api.github.com/users/mmoskal/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoskal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoskal/subscriptions","organizations_url":"https://api.github.com/users/mmoskal/orgs","repos_url":"https://api.github.com/users/mmoskal/repos","events_url":"https://api.github.com/users/mmoskal/events{/privacy}","received_events_url":"https://api.github.com/users/mmoskal/received_events","type":"User","site_admin":false},"created_at":"2019-12-06T23:49:29Z","updated_at":"2019-12-06T23:49:29Z","author_association":"MEMBER","body":"simplified\r\n```typescript\r\nclass Foobar {\r\n    constructor(public x:Fx8, public y:Fx8) {}\r\n}\r\n\r\nfunction testIt() {\r\n    let s = new Foobar(Fx.zeroFx8, Fx.oneFx8)\r\n    let right = true\r\n\r\n    let vv = Fx.zeroFx8\r\n\r\n    s.x = Fx.sub(\r\n        right ? vv : vv,\r\n        s.y\r\n    );\r\n\r\n    console.log(s.x)\r\n}\r\n\r\ngame.consoleOverlay.setVisible(true)\r\ntestIt()\r\n```"}}
{"actor":{"display_login":"mmoskal"}}