{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/21316","repository_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/21316/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/21316/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/21316/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/21316","id":238414944,"number":21316,"title":"[CR] Fix crash when removing armor","user":{"login":"jzambo","id":29691881,"avatar_url":"https://avatars1.githubusercontent.com/u/29691881?v=3","gravatar_id":"","url":"https://api.github.com/users/jzambo","html_url":"https://github.com/jzambo","followers_url":"https://api.github.com/users/jzambo/followers","following_url":"https://api.github.com/users/jzambo/following{/other_user}","gists_url":"https://api.github.com/users/jzambo/gists{/gist_id}","starred_url":"https://api.github.com/users/jzambo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzambo/subscriptions","organizations_url":"https://api.github.com/users/jzambo/orgs","repos_url":"https://api.github.com/users/jzambo/repos","events_url":"https://api.github.com/users/jzambo/events{/privacy}","received_events_url":"https://api.github.com/users/jzambo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-25T23:42:41Z","updated_at":"2017-06-26T21:06:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/21316","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/21316","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/21316.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/21316.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/311181916","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/21316#issuecomment-311181916","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/21316","id":311181916,"user":{"login":"jzambo","id":29691881,"avatar_url":"https://avatars1.githubusercontent.com/u/29691881?v=3","gravatar_id":"","url":"https://api.github.com/users/jzambo","html_url":"https://github.com/jzambo","followers_url":"https://api.github.com/users/jzambo/followers","following_url":"https://api.github.com/users/jzambo/following{/other_user}","gists_url":"https://api.github.com/users/jzambo/gists{/gist_id}","starred_url":"https://api.github.com/users/jzambo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzambo/subscriptions","organizations_url":"https://api.github.com/users/jzambo/orgs","repos_url":"https://api.github.com/users/jzambo/repos","events_url":"https://api.github.com/users/jzambo/events{/privacy}","received_events_url":"https://api.github.com/users/jzambo/received_events","type":"User","site_admin":false},"created_at":"2017-06-26T21:06:32Z","updated_at":"2017-06-26T21:06:32Z","body":"I believe it will never crash because std::min is done on unsigned arithmetic thanks to size_type from size() call. The compiler used by CI rejects this approach though.\r\n\r\nNew behavior possibly introduces a minor issue where worn item \"cursor\" is reset instead of being decremented if necessary to stay in bounds. To fix this, I need to move the cursor which is trivial if you know how to satisfy the compiler.\r\n\r\nThe problem I have is with \"converting\" between incompatible C++ types available here: iterators, size_type and int. I would appreciate guidance regarding arithmetic on indexes into STL vectors here. \r\n\r\nMy guess is that leftListIndex should be of type size_type but I haven't tried that."}}
{"actor":{"display_login":"jzambo"}}