{"action":"created","issue":{"url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/23","repository_url":"https://api.github.com/repos/ToninoTarsi/swpi","labels_url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/23/comments","events_url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/23/events","html_url":"https://github.com/ToninoTarsi/swpi/issues/23","id":394739093,"node_id":"MDU6SXNzdWUzOTQ3MzkwOTM=","number":23,"title":"Checksum calculation fails on overflow","user":{"login":"saedelman","id":5248091,"node_id":"MDQ6VXNlcjUyNDgwOTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5248091?v=4","gravatar_id":"","url":"https://api.github.com/users/saedelman","html_url":"https://github.com/saedelman","followers_url":"https://api.github.com/users/saedelman/followers","following_url":"https://api.github.com/users/saedelman/following{/other_user}","gists_url":"https://api.github.com/users/saedelman/gists{/gist_id}","starred_url":"https://api.github.com/users/saedelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saedelman/subscriptions","organizations_url":"https://api.github.com/users/saedelman/orgs","repos_url":"https://api.github.com/users/saedelman/repos","events_url":"https://api.github.com/users/saedelman/events{/privacy}","received_events_url":"https://api.github.com/users/saedelman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-28T23:42:15Z","updated_at":"2018-12-29T18:16:28Z","closed_at":null,"author_association":"NONE","body":"Your checksumCalc variable can overflow. You need to mask it with 0x0f otherwise the checksum comparison will fail eventhough it matches.\r\n\r\n```\r\nunsigned int checksumCalc = 0;\r\nchecksumCalc += (winddir & 0x0f);\r\nchecksumCalc += ((windspeed >> 8) & 0x0f);\r\nchecksumCalc += ((windspeed >> 4) & 0x0f);\r\nchecksumCalc += (windspeed & 0x0f);\r\n```\r\n\r\nYou need to add:\r\n\r\n`checksumCalc &= 0x0f;\r\n`"},"comment":{"url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/comments/450510534","html_url":"https://github.com/ToninoTarsi/swpi/issues/23#issuecomment-450510534","issue_url":"https://api.github.com/repos/ToninoTarsi/swpi/issues/23","id":450510534,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUxMDUzNA==","user":{"login":"ToninoTarsi","id":2813132,"node_id":"MDQ6VXNlcjI4MTMxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/2813132?v=4","gravatar_id":"","url":"https://api.github.com/users/ToninoTarsi","html_url":"https://github.com/ToninoTarsi","followers_url":"https://api.github.com/users/ToninoTarsi/followers","following_url":"https://api.github.com/users/ToninoTarsi/following{/other_user}","gists_url":"https://api.github.com/users/ToninoTarsi/gists{/gist_id}","starred_url":"https://api.github.com/users/ToninoTarsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToninoTarsi/subscriptions","organizations_url":"https://api.github.com/users/ToninoTarsi/orgs","repos_url":"https://api.github.com/users/ToninoTarsi/repos","events_url":"https://api.github.com/users/ToninoTarsi/events{/privacy}","received_events_url":"https://api.github.com/users/ToninoTarsi/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T18:16:28Z","updated_at":"2018-12-29T18:16:28Z","author_association":"OWNER","body":"Thanks. You can ask for a Push Request for that if you want. "}}
{"actor":{"display_login":"ToninoTarsi"}}