{"action":"created","issue":{"url":"https://api.github.com/repos/brocaar/loraserver/issues/324","repository_url":"https://api.github.com/repos/brocaar/loraserver","labels_url":"https://api.github.com/repos/brocaar/loraserver/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/brocaar/loraserver/issues/324/comments","events_url":"https://api.github.com/repos/brocaar/loraserver/issues/324/events","html_url":"https://github.com/brocaar/loraserver/pull/324","id":324057995,"number":324,"title":"Fixed the \"index out of range\" error when scanning for conflicting MAC commands.","user":{"login":"amrbekhit","id":7573225,"avatar_url":"https://avatars0.githubusercontent.com/u/7573225?v=4","gravatar_id":"","url":"https://api.github.com/users/amrbekhit","html_url":"https://github.com/amrbekhit","followers_url":"https://api.github.com/users/amrbekhit/followers","following_url":"https://api.github.com/users/amrbekhit/following{/other_user}","gists_url":"https://api.github.com/users/amrbekhit/gists{/gist_id}","starred_url":"https://api.github.com/users/amrbekhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amrbekhit/subscriptions","organizations_url":"https://api.github.com/users/amrbekhit/orgs","repos_url":"https://api.github.com/users/amrbekhit/repos","events_url":"https://api.github.com/users/amrbekhit/events{/privacy}","received_events_url":"https://api.github.com/users/amrbekhit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-17T14:50:19Z","updated_at":"2018-05-17T16:09:33Z","closed_at":"2018-05-17T16:01:18Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/brocaar/loraserver/pulls/324","html_url":"https://github.com/brocaar/loraserver/pull/324","diff_url":"https://github.com/brocaar/loraserver/pull/324.diff","patch_url":"https://github.com/brocaar/loraserver/pull/324.patch"},"body":"In setMACCommands, the code checks to see whether the MAC payload contains any conflicting MAC commands and if so, removes the conflicting ones. However, the code was modifying the array while ascending through it in the for loop, which can cause bugs as the array range calculated at the beginning of the for loop is now wrong. This fix scans the array in descending order, thus avoiding any problems.\r\n\r\nFixes #323"},"comment":{"url":"https://api.github.com/repos/brocaar/loraserver/issues/comments/389921778","html_url":"https://github.com/brocaar/loraserver/pull/324#issuecomment-389921778","issue_url":"https://api.github.com/repos/brocaar/loraserver/issues/324","id":389921778,"user":{"login":"amrbekhit","id":7573225,"avatar_url":"https://avatars0.githubusercontent.com/u/7573225?v=4","gravatar_id":"","url":"https://api.github.com/users/amrbekhit","html_url":"https://github.com/amrbekhit","followers_url":"https://api.github.com/users/amrbekhit/followers","following_url":"https://api.github.com/users/amrbekhit/following{/other_user}","gists_url":"https://api.github.com/users/amrbekhit/gists{/gist_id}","starred_url":"https://api.github.com/users/amrbekhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amrbekhit/subscriptions","organizations_url":"https://api.github.com/users/amrbekhit/orgs","repos_url":"https://api.github.com/users/amrbekhit/repos","events_url":"https://api.github.com/users/amrbekhit/events{/privacy}","received_events_url":"https://api.github.com/users/amrbekhit/received_events","type":"User","site_admin":false},"created_at":"2018-05-17T16:09:33Z","updated_at":"2018-05-17T16:09:33Z","author_association":"NONE","body":"Ah yes - you're right about the `i >= 0` bit - good catch to you too!"}}
{"actor":{"display_login":"amrbekhit"}}