{"action":"created","comment":{"url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/comments/67035797","id":67035797,"diff_hunk":"@@ -197,10 +197,10 @@ - (void)scrollToIndex:(CGFloat)index animated:(BOOL)animated {\n     \n     if ([self.buttons count] > 0 && (self.scrollView.contentSize.width > CGRectGetWidth(self.scrollView.bounds))) {\n         CGFloat offset = 0;\n-        NSInteger prevButtonIndex = MAX(floorf(index), 0);\n+        NSInteger prevButtonIndex = MAX(MIN(floorf(index), [self.buttons count]), 0);\n         NSInteger nextButtonIndex = MIN(ceilf(index), [self.buttons count] - 1);\n         \n-        for (NSInteger ii = 0, count = MIN(prevButtonIndex, [self.buttons count]); ii < count; ++ii) {\n+        for (NSInteger ii = 0, count = prevButtonIndex; ii < count; ++ii) {\n             offset += CGRectGetWidth([self.buttons[ii] bounds]);\n             offset += self.separatorSize.width;\n         }","path":"Pod/Classes/MRGPagerTitleStrip.m","position":12,"original_position":12,"commit_id":"4dac33b54bf8a9308356f9a4bb9e3e2b13fd1834","original_commit_id":"4dac33b54bf8a9308356f9a4bb9e3e2b13fd1834","user":{"login":"mbaron","id":3072749,"avatar_url":"https://avatars.githubusercontent.com/u/3072749?v=3","gravatar_id":"","url":"https://api.github.com/users/mbaron","html_url":"https://github.com/mbaron","followers_url":"https://api.github.com/users/mbaron/followers","following_url":"https://api.github.com/users/mbaron/following{/other_user}","gists_url":"https://api.github.com/users/mbaron/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaron/subscriptions","organizations_url":"https://api.github.com/users/mbaron/orgs","repos_url":"https://api.github.com/users/mbaron/repos","events_url":"https://api.github.com/users/mbaron/events{/privacy}","received_events_url":"https://api.github.com/users/mbaron/received_events","type":"User","site_admin":false},"body":"On ne voit pas mais le bug était à la ligne #217: ça utilisait un \"prevButtonIndex\" plus grand que le nombre de boutons","created_at":"2016-06-14T19:05:01Z","updated_at":"2016-06-14T19:05:01Z","html_url":"https://github.com/mirego/MRGPagerController/pull/9#discussion_r67035797","pull_request_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/comments/67035797"},"html":{"href":"https://github.com/mirego/MRGPagerController/pull/9#discussion_r67035797"},"pull_request":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9","id":73795519,"html_url":"https://github.com/mirego/MRGPagerController/pull/9","diff_url":"https://github.com/mirego/MRGPagerController/pull/9.diff","patch_url":"https://github.com/mirego/MRGPagerController/pull/9.patch","issue_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/9","number":9,"state":"open","locked":false,"title":"ScrollToIndex: fix when previousButton index is larger than current button count","user":{"login":"mbaron","id":3072749,"avatar_url":"https://avatars.githubusercontent.com/u/3072749?v=3","gravatar_id":"","url":"https://api.github.com/users/mbaron","html_url":"https://github.com/mbaron","followers_url":"https://api.github.com/users/mbaron/followers","following_url":"https://api.github.com/users/mbaron/following{/other_user}","gists_url":"https://api.github.com/users/mbaron/gists{/gist_id}","starred_url":"https://api.github.com/users/mbaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbaron/subscriptions","organizations_url":"https://api.github.com/users/mbaron/orgs","repos_url":"https://api.github.com/users/mbaron/repos","events_url":"https://api.github.com/users/mbaron/events{/privacy}","received_events_url":"https://api.github.com/users/mbaron/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-14T19:03:59Z","updated_at":"2016-06-14T19:05:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51d7f0185934da44bc1d9ee754f573709b8bc1d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9/commits","review_comments_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9/comments","review_comment_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/9/comments","statuses_url":"https://api.github.com/repos/mirego/MRGPagerController/statuses/4dac33b54bf8a9308356f9a4bb9e3e2b13fd1834","head":{"label":"mirego:fix/ScrollToIndex_previous_button_index_larger_than_button_count","ref":"fix/ScrollToIndex_previous_button_index_larger_than_button_count","sha":"4dac33b54bf8a9308356f9a4bb9e3e2b13fd1834","user":{"login":"mirego","id":1202891,"avatar_url":"https://avatars.githubusercontent.com/u/1202891?v=3","gravatar_id":"","url":"https://api.github.com/users/mirego","html_url":"https://github.com/mirego","followers_url":"https://api.github.com/users/mirego/followers","following_url":"https://api.github.com/users/mirego/following{/other_user}","gists_url":"https://api.github.com/users/mirego/gists{/gist_id}","starred_url":"https://api.github.com/users/mirego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirego/subscriptions","organizations_url":"https://api.github.com/users/mirego/orgs","repos_url":"https://api.github.com/users/mirego/repos","events_url":"https://api.github.com/users/mirego/events{/privacy}","received_events_url":"https://api.github.com/users/mirego/received_events","type":"Organization","site_admin":false},"repo":{"id":22886891,"name":"MRGPagerController","full_name":"mirego/MRGPagerController","owner":{"login":"mirego","id":1202891,"avatar_url":"https://avatars.githubusercontent.com/u/1202891?v=3","gravatar_id":"","url":"https://api.github.com/users/mirego","html_url":"https://github.com/mirego","followers_url":"https://api.github.com/users/mirego/followers","following_url":"https://api.github.com/users/mirego/following{/other_user}","gists_url":"https://api.github.com/users/mirego/gists{/gist_id}","starred_url":"https://api.github.com/users/mirego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirego/subscriptions","organizations_url":"https://api.github.com/users/mirego/orgs","repos_url":"https://api.github.com/users/mirego/repos","events_url":"https://api.github.com/users/mirego/events{/privacy}","received_events_url":"https://api.github.com/users/mirego/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mirego/MRGPagerController","description":"An highly customizable pager controller","fork":false,"url":"https://api.github.com/repos/mirego/MRGPagerController","forks_url":"https://api.github.com/repos/mirego/MRGPagerController/forks","keys_url":"https://api.github.com/repos/mirego/MRGPagerController/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mirego/MRGPagerController/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mirego/MRGPagerController/teams","hooks_url":"https://api.github.com/repos/mirego/MRGPagerController/hooks","issue_events_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/events{/number}","events_url":"https://api.github.com/repos/mirego/MRGPagerController/events","assignees_url":"https://api.github.com/repos/mirego/MRGPagerController/assignees{/user}","branches_url":"https://api.github.com/repos/mirego/MRGPagerController/branches{/branch}","tags_url":"https://api.github.com/repos/mirego/MRGPagerController/tags","blobs_url":"https://api.github.com/repos/mirego/MRGPagerController/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mirego/MRGPagerController/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mirego/MRGPagerController/git/refs{/sha}","trees_url":"https://api.github.com/repos/mirego/MRGPagerController/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mirego/MRGPagerController/statuses/{sha}","languages_url":"https://api.github.com/repos/mirego/MRGPagerController/languages","stargazers_url":"https://api.github.com/repos/mirego/MRGPagerController/stargazers","contributors_url":"https://api.github.com/repos/mirego/MRGPagerController/contributors","subscribers_url":"https://api.github.com/repos/mirego/MRGPagerController/subscribers","subscription_url":"https://api.github.com/repos/mirego/MRGPagerController/subscription","commits_url":"https://api.github.com/repos/mirego/MRGPagerController/commits{/sha}","git_commits_url":"https://api.github.com/repos/mirego/MRGPagerController/git/commits{/sha}","comments_url":"https://api.github.com/repos/mirego/MRGPagerController/comments{/number}","issue_comment_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/comments{/number}","contents_url":"https://api.github.com/repos/mirego/MRGPagerController/contents/{+path}","compare_url":"https://api.github.com/repos/mirego/MRGPagerController/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mirego/MRGPagerController/merges","archive_url":"https://api.github.com/repos/mirego/MRGPagerController/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mirego/MRGPagerController/downloads","issues_url":"https://api.github.com/repos/mirego/MRGPagerController/issues{/number}","pulls_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls{/number}","milestones_url":"https://api.github.com/repos/mirego/MRGPagerController/milestones{/number}","notifications_url":"https://api.github.com/repos/mirego/MRGPagerController/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mirego/MRGPagerController/labels{/name}","releases_url":"https://api.github.com/repos/mirego/MRGPagerController/releases{/id}","deployments_url":"https://api.github.com/repos/mirego/MRGPagerController/deployments","created_at":"2014-08-12T17:56:59Z","updated_at":"2016-03-31T23:56:40Z","pushed_at":"2016-06-14T19:04:00Z","git_url":"git://github.com/mirego/MRGPagerController.git","ssh_url":"git@github.com:mirego/MRGPagerController.git","clone_url":"https://github.com/mirego/MRGPagerController.git","svn_url":"https://github.com/mirego/MRGPagerController","homepage":null,"size":247,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"mirego:master","ref":"master","sha":"46f701d1d4c1791b5b17d51706dac2deac31e1b1","user":{"login":"mirego","id":1202891,"avatar_url":"https://avatars.githubusercontent.com/u/1202891?v=3","gravatar_id":"","url":"https://api.github.com/users/mirego","html_url":"https://github.com/mirego","followers_url":"https://api.github.com/users/mirego/followers","following_url":"https://api.github.com/users/mirego/following{/other_user}","gists_url":"https://api.github.com/users/mirego/gists{/gist_id}","starred_url":"https://api.github.com/users/mirego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirego/subscriptions","organizations_url":"https://api.github.com/users/mirego/orgs","repos_url":"https://api.github.com/users/mirego/repos","events_url":"https://api.github.com/users/mirego/events{/privacy}","received_events_url":"https://api.github.com/users/mirego/received_events","type":"Organization","site_admin":false},"repo":{"id":22886891,"name":"MRGPagerController","full_name":"mirego/MRGPagerController","owner":{"login":"mirego","id":1202891,"avatar_url":"https://avatars.githubusercontent.com/u/1202891?v=3","gravatar_id":"","url":"https://api.github.com/users/mirego","html_url":"https://github.com/mirego","followers_url":"https://api.github.com/users/mirego/followers","following_url":"https://api.github.com/users/mirego/following{/other_user}","gists_url":"https://api.github.com/users/mirego/gists{/gist_id}","starred_url":"https://api.github.com/users/mirego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirego/subscriptions","organizations_url":"https://api.github.com/users/mirego/orgs","repos_url":"https://api.github.com/users/mirego/repos","events_url":"https://api.github.com/users/mirego/events{/privacy}","received_events_url":"https://api.github.com/users/mirego/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mirego/MRGPagerController","description":"An highly customizable pager controller","fork":false,"url":"https://api.github.com/repos/mirego/MRGPagerController","forks_url":"https://api.github.com/repos/mirego/MRGPagerController/forks","keys_url":"https://api.github.com/repos/mirego/MRGPagerController/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mirego/MRGPagerController/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mirego/MRGPagerController/teams","hooks_url":"https://api.github.com/repos/mirego/MRGPagerController/hooks","issue_events_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/events{/number}","events_url":"https://api.github.com/repos/mirego/MRGPagerController/events","assignees_url":"https://api.github.com/repos/mirego/MRGPagerController/assignees{/user}","branches_url":"https://api.github.com/repos/mirego/MRGPagerController/branches{/branch}","tags_url":"https://api.github.com/repos/mirego/MRGPagerController/tags","blobs_url":"https://api.github.com/repos/mirego/MRGPagerController/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mirego/MRGPagerController/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mirego/MRGPagerController/git/refs{/sha}","trees_url":"https://api.github.com/repos/mirego/MRGPagerController/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mirego/MRGPagerController/statuses/{sha}","languages_url":"https://api.github.com/repos/mirego/MRGPagerController/languages","stargazers_url":"https://api.github.com/repos/mirego/MRGPagerController/stargazers","contributors_url":"https://api.github.com/repos/mirego/MRGPagerController/contributors","subscribers_url":"https://api.github.com/repos/mirego/MRGPagerController/subscribers","subscription_url":"https://api.github.com/repos/mirego/MRGPagerController/subscription","commits_url":"https://api.github.com/repos/mirego/MRGPagerController/commits{/sha}","git_commits_url":"https://api.github.com/repos/mirego/MRGPagerController/git/commits{/sha}","comments_url":"https://api.github.com/repos/mirego/MRGPagerController/comments{/number}","issue_comment_url":"https://api.github.com/repos/mirego/MRGPagerController/issues/comments{/number}","contents_url":"https://api.github.com/repos/mirego/MRGPagerController/contents/{+path}","compare_url":"https://api.github.com/repos/mirego/MRGPagerController/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mirego/MRGPagerController/merges","archive_url":"https://api.github.com/repos/mirego/MRGPagerController/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mirego/MRGPagerController/downloads","issues_url":"https://api.github.com/repos/mirego/MRGPagerController/issues{/number}","pulls_url":"https://api.github.com/repos/mirego/MRGPagerController/pulls{/number}","milestones_url":"https://api.github.com/repos/mirego/MRGPagerController/milestones{/number}","notifications_url":"https://api.github.com/repos/mirego/MRGPagerController/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mirego/MRGPagerController/labels{/name}","releases_url":"https://api.github.com/repos/mirego/MRGPagerController/releases{/id}","deployments_url":"https://api.github.com/repos/mirego/MRGPagerController/deployments","created_at":"2014-08-12T17:56:59Z","updated_at":"2016-03-31T23:56:40Z","pushed_at":"2016-06-14T19:04:00Z","git_url":"git://github.com/mirego/MRGPagerController.git","ssh_url":"git@github.com:mirego/MRGPagerController.git","clone_url":"https://github.com/mirego/MRGPagerController.git","svn_url":"https://github.com/mirego/MRGPagerController","homepage":null,"size":247,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9"},"html":{"href":"https://github.com/mirego/MRGPagerController/pull/9"},"issue":{"href":"https://api.github.com/repos/mirego/MRGPagerController/issues/9"},"comments":{"href":"https://api.github.com/repos/mirego/MRGPagerController/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mirego/MRGPagerController/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/mirego/MRGPagerController/statuses/4dac33b54bf8a9308356f9a4bb9e3e2b13fd1834"}}}}
{"actor":{"display_login":"mbaron"}}