{"action":"created","issue":{"url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/187","repository_url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary","labels_url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/187/comments","events_url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/187/events","html_url":"https://github.com/RimWorldCCLTeam/CommunityCoreLibrary/issues/187","id":191396340,"number":187,"title":"PawnHasJobUsing() not inspects pawn.CurJob.targetC","user":{"login":"valuerr","id":1613106,"avatar_url":"https://avatars.githubusercontent.com/u/1613106?v=3","gravatar_id":"","url":"https://api.github.com/users/valuerr","html_url":"https://github.com/valuerr","followers_url":"https://api.github.com/users/valuerr/followers","following_url":"https://api.github.com/users/valuerr/following{/other_user}","gists_url":"https://api.github.com/users/valuerr/gists{/gist_id}","starred_url":"https://api.github.com/users/valuerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valuerr/subscriptions","organizations_url":"https://api.github.com/users/valuerr/orgs","repos_url":"https://api.github.com/users/valuerr/repos","events_url":"https://api.github.com/users/valuerr/events{/privacy}","received_events_url":"https://api.github.com/users/valuerr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-23T22:47:43Z","updated_at":"2016-11-25T11:21:54Z","closed_at":null,"body":"Just inspected a15-code with PVS-Studio and found follow:\r\n```\r\n// CommunityCoreLibrary\\DLL_Project\\Extensions\\Thing_Extensions.cs\r\n\r\n    public static bool PawnHasJobUsing( this Thing thing, Pawn pawn )\r\n        {\r\n            if(\r\n                ( pawn == null ) ||\r\n                ( pawn.CurJob == null )\r\n            )\r\n            {\r\n                return false;\r\n            }\r\n            if(\r\n                ( pawn.CurJob.targetA != null ) &&\r\n                ( pawn.CurJob.targetA.Thing == thing )\r\n            )\r\n            {\r\n                return true;\r\n            }\r\n            if(\r\n                ( pawn.CurJob.targetB != null ) &&\r\n                ( pawn.CurJob.targetB.Thing == thing )\r\n            )\r\n            {\r\n                return true;\r\n            }\r\n            if(\r\n                ( pawn.CurJob.targetB != null ) &&\r\n                ( pawn.CurJob.targetB.Thing == thing )\r\n            )\r\n            {\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n```\r\nThere are two identical conditions with `pawn.CurJob.targetB`, it seems the last should be `pawn.CurJob.targetC`"},"comment":{"url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/comments/262936310","html_url":"https://github.com/RimWorldCCLTeam/CommunityCoreLibrary/issues/187#issuecomment-262936310","issue_url":"https://api.github.com/repos/RimWorldCCLTeam/CommunityCoreLibrary/issues/187","id":262936310,"user":{"login":"ForsakenShell","id":12161749,"avatar_url":"https://avatars.githubusercontent.com/u/12161749?v=3","gravatar_id":"","url":"https://api.github.com/users/ForsakenShell","html_url":"https://github.com/ForsakenShell","followers_url":"https://api.github.com/users/ForsakenShell/followers","following_url":"https://api.github.com/users/ForsakenShell/following{/other_user}","gists_url":"https://api.github.com/users/ForsakenShell/gists{/gist_id}","starred_url":"https://api.github.com/users/ForsakenShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForsakenShell/subscriptions","organizations_url":"https://api.github.com/users/ForsakenShell/orgs","repos_url":"https://api.github.com/users/ForsakenShell/repos","events_url":"https://api.github.com/users/ForsakenShell/events{/privacy}","received_events_url":"https://api.github.com/users/ForsakenShell/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T11:21:54Z","updated_at":"2016-11-25T11:21:54Z","body":"Thanks for catching those, this is by far the easiest bug report to find solutions for.  ;)"}}
{"actor":{"display_login":"ForsakenShell"}}