{"action":"created","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/19149","repository_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/19149/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/19149/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/19149/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/19149","id":187281981,"number":19149,"title":"Hack around long overflow in water crafting","user":{"login":"Coolthulhu","id":1878860,"avatar_url":"https://avatars.githubusercontent.com/u/1878860?v=3","gravatar_id":"","url":"https://api.github.com/users/Coolthulhu","html_url":"https://github.com/Coolthulhu","followers_url":"https://api.github.com/users/Coolthulhu/followers","following_url":"https://api.github.com/users/Coolthulhu/following{/other_user}","gists_url":"https://api.github.com/users/Coolthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Coolthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coolthulhu/subscriptions","organizations_url":"https://api.github.com/users/Coolthulhu/orgs","repos_url":"https://api.github.com/users/Coolthulhu/repos","events_url":"https://api.github.com/users/Coolthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/Coolthulhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-04T08:58:19Z","updated_at":"2016-11-04T09:32:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/pulls/19149","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/19149","diff_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/19149.diff","patch_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/19149.patch"},"body":"Problem: infinite charges are represented by max value of `long`. Then they are added to things.\r\nFor example, when you stand next to a water source, but have water in inventory. In this case charges of water tile and held water will be added, overflowing the `long`.\r\nWorse yet: the bug doesn't always reproduce reliably because it depends on number of water tiles nearby (even number of tiles will overflow even number of times).\r\n\r\nThis needs to be special cased like here or redesigned. For example, by using `>= MAX_LONG / 2` as sign of infinite charges. Chances that anyone reaches half of the max value of `long` are very low and not that much higher than anyone will reach the actual max value of `long`.\r\n\r\nFor now going with quick fix, because I want to fix the issue before redesigning everything."},"comment":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/comments/258382231","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/pull/19149#issuecomment-258382231","issue_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/19149","id":258382231,"user":{"login":"mugling","id":12238606,"avatar_url":"https://avatars.githubusercontent.com/u/12238606?v=3","gravatar_id":"","url":"https://api.github.com/users/mugling","html_url":"https://github.com/mugling","followers_url":"https://api.github.com/users/mugling/followers","following_url":"https://api.github.com/users/mugling/following{/other_user}","gists_url":"https://api.github.com/users/mugling/gists{/gist_id}","starred_url":"https://api.github.com/users/mugling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mugling/subscriptions","organizations_url":"https://api.github.com/users/mugling/orgs","repos_url":"https://api.github.com/users/mugling/repos","events_url":"https://api.github.com/users/mugling/events{/privacy}","received_events_url":"https://api.github.com/users/mugling/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T09:32:32Z","updated_at":"2016-11-04T09:32:32Z","body":"Can you add some source comments explaining the temporary nature of this change?"}}
{"actor":{"display_login":"mugling"}}