{"action":"created","comment":{"url":"https://api.github.com/repos/robpike/ivy/pulls/comments/22533856","id":22533856,"diff_hunk":"@@ -175,7 +175,9 @@ func (l *Scanner) next() rune {\n \tif !l.done && int(l.pos) == len(l.input) {\n \t\tl.loadLine()\n \t}\n-\tif len(l.input) == l.start {\n+\tif l.pos >= len(l.input) {","path":"scan/scan.go","position":5,"original_position":5,"commit_id":"0ac5433703e640079b723c552932b7c756e85567","original_commit_id":"0ac5433703e640079b723c552932b7c756e85567","user":{"login":"jirkadanek","id":442720,"avatar_url":"https://avatars.githubusercontent.com/u/442720?v=3","gravatar_id":"","url":"https://api.github.com/users/jirkadanek","html_url":"https://github.com/jirkadanek","followers_url":"https://api.github.com/users/jirkadanek/followers","following_url":"https://api.github.com/users/jirkadanek/following{/other_user}","gists_url":"https://api.github.com/users/jirkadanek/gists{/gist_id}","starred_url":"https://api.github.com/users/jirkadanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirkadanek/subscriptions","organizations_url":"https://api.github.com/users/jirkadanek/orgs","repos_url":"https://api.github.com/users/jirkadanek/repos","events_url":"https://api.github.com/users/jirkadanek/events{/privacy}","received_events_url":"https://api.github.com/users/jirkadanek/received_events","type":"User","site_admin":false},"body":"shouldn't this actually be `if l.start + l.pos >= len(l.input) {`?","created_at":"2015-01-06T16:50:12Z","updated_at":"2015-01-06T16:50:12Z","html_url":"https://github.com/robpike/ivy/pull/2#discussion_r22533856","pull_request_url":"https://api.github.com/repos/robpike/ivy/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/robpike/ivy/pulls/comments/22533856"},"html":{"href":"https://github.com/robpike/ivy/pull/2#discussion_r22533856"},"pull_request":{"href":"https://api.github.com/repos/robpike/ivy/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/robpike/ivy/pulls/2","id":26844590,"html_url":"https://github.com/robpike/ivy/pull/2","diff_url":"https://github.com/robpike/ivy/pull/2.diff","patch_url":"https://github.com/robpike/ivy/pull/2.patch","issue_url":"https://api.github.com/repos/robpike/ivy/issues/2","number":2,"state":"open","locked":false,"title":"Ivy freezes on unterminated quoted string in input","user":{"login":"jirkadanek","id":442720,"avatar_url":"https://avatars.githubusercontent.com/u/442720?v=3","gravatar_id":"","url":"https://api.github.com/users/jirkadanek","html_url":"https://github.com/jirkadanek","followers_url":"https://api.github.com/users/jirkadanek/followers","following_url":"https://api.github.com/users/jirkadanek/following{/other_user}","gists_url":"https://api.github.com/users/jirkadanek/gists{/gist_id}","starred_url":"https://api.github.com/users/jirkadanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirkadanek/subscriptions","organizations_url":"https://api.github.com/users/jirkadanek/orgs","repos_url":"https://api.github.com/users/jirkadanek/repos","events_url":"https://api.github.com/users/jirkadanek/events{/privacy}","received_events_url":"https://api.github.com/users/jirkadanek/received_events","type":"User","site_admin":false},"body":"    $ echo '\"aaa' > test.txt\r\n    $ ./ivy < test.txt\r\n         # ivy gets stuck and consumes 100% of one CPU core\r\n\r\nafter this patch (I am not saying it is the correct fix) it looks like this\r\n\r\n    $ ./ivy < test.txt\r\n    <stdin>:0: \"error: unterminated quoted string\"","created_at":"2015-01-05T19:24:47Z","updated_at":"2015-01-06T16:50:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90df5f44c342c2d665a7b368f3a33c9ede3f18c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/robpike/ivy/pulls/2/commits","review_comments_url":"https://api.github.com/repos/robpike/ivy/pulls/2/comments","review_comment_url":"https://api.github.com/repos/robpike/ivy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/robpike/ivy/issues/2/comments","statuses_url":"https://api.github.com/repos/robpike/ivy/statuses/0ac5433703e640079b723c552932b7c756e85567","head":{"label":"jirkadanek:master","ref":"master","sha":"0ac5433703e640079b723c552932b7c756e85567","user":{"login":"jirkadanek","id":442720,"avatar_url":"https://avatars.githubusercontent.com/u/442720?v=3","gravatar_id":"","url":"https://api.github.com/users/jirkadanek","html_url":"https://github.com/jirkadanek","followers_url":"https://api.github.com/users/jirkadanek/followers","following_url":"https://api.github.com/users/jirkadanek/following{/other_user}","gists_url":"https://api.github.com/users/jirkadanek/gists{/gist_id}","starred_url":"https://api.github.com/users/jirkadanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirkadanek/subscriptions","organizations_url":"https://api.github.com/users/jirkadanek/orgs","repos_url":"https://api.github.com/users/jirkadanek/repos","events_url":"https://api.github.com/users/jirkadanek/events{/privacy}","received_events_url":"https://api.github.com/users/jirkadanek/received_events","type":"User","site_admin":false},"repo":{"id":28824468,"name":"ivy","full_name":"jirkadanek/ivy","owner":{"login":"jirkadanek","id":442720,"avatar_url":"https://avatars.githubusercontent.com/u/442720?v=3","gravatar_id":"","url":"https://api.github.com/users/jirkadanek","html_url":"https://github.com/jirkadanek","followers_url":"https://api.github.com/users/jirkadanek/followers","following_url":"https://api.github.com/users/jirkadanek/following{/other_user}","gists_url":"https://api.github.com/users/jirkadanek/gists{/gist_id}","starred_url":"https://api.github.com/users/jirkadanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirkadanek/subscriptions","organizations_url":"https://api.github.com/users/jirkadanek/orgs","repos_url":"https://api.github.com/users/jirkadanek/repos","events_url":"https://api.github.com/users/jirkadanek/events{/privacy}","received_events_url":"https://api.github.com/users/jirkadanek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jirkadanek/ivy","description":"ivy, an APL-like calculator","fork":true,"url":"https://api.github.com/repos/jirkadanek/ivy","forks_url":"https://api.github.com/repos/jirkadanek/ivy/forks","keys_url":"https://api.github.com/repos/jirkadanek/ivy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jirkadanek/ivy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jirkadanek/ivy/teams","hooks_url":"https://api.github.com/repos/jirkadanek/ivy/hooks","issue_events_url":"https://api.github.com/repos/jirkadanek/ivy/issues/events{/number}","events_url":"https://api.github.com/repos/jirkadanek/ivy/events","assignees_url":"https://api.github.com/repos/jirkadanek/ivy/assignees{/user}","branches_url":"https://api.github.com/repos/jirkadanek/ivy/branches{/branch}","tags_url":"https://api.github.com/repos/jirkadanek/ivy/tags","blobs_url":"https://api.github.com/repos/jirkadanek/ivy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jirkadanek/ivy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jirkadanek/ivy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jirkadanek/ivy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jirkadanek/ivy/statuses/{sha}","languages_url":"https://api.github.com/repos/jirkadanek/ivy/languages","stargazers_url":"https://api.github.com/repos/jirkadanek/ivy/stargazers","contributors_url":"https://api.github.com/repos/jirkadanek/ivy/contributors","subscribers_url":"https://api.github.com/repos/jirkadanek/ivy/subscribers","subscription_url":"https://api.github.com/repos/jirkadanek/ivy/subscription","commits_url":"https://api.github.com/repos/jirkadanek/ivy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jirkadanek/ivy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jirkadanek/ivy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jirkadanek/ivy/issues/comments/{number}","contents_url":"https://api.github.com/repos/jirkadanek/ivy/contents/{+path}","compare_url":"https://api.github.com/repos/jirkadanek/ivy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jirkadanek/ivy/merges","archive_url":"https://api.github.com/repos/jirkadanek/ivy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jirkadanek/ivy/downloads","issues_url":"https://api.github.com/repos/jirkadanek/ivy/issues{/number}","pulls_url":"https://api.github.com/repos/jirkadanek/ivy/pulls{/number}","milestones_url":"https://api.github.com/repos/jirkadanek/ivy/milestones{/number}","notifications_url":"https://api.github.com/repos/jirkadanek/ivy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jirkadanek/ivy/labels{/name}","releases_url":"https://api.github.com/repos/jirkadanek/ivy/releases{/id}","created_at":"2015-01-05T17:57:36Z","updated_at":"2015-01-05T19:18:05Z","pushed_at":"2015-01-05T19:18:05Z","git_url":"git://github.com/jirkadanek/ivy.git","ssh_url":"git@github.com:jirkadanek/ivy.git","clone_url":"https://github.com/jirkadanek/ivy.git","svn_url":"https://github.com/jirkadanek/ivy","homepage":null,"size":656,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"robpike:master","ref":"master","sha":"44a38fb971c6773a157ee3678d41ea9f48696941","user":{"login":"robpike","id":4324516,"avatar_url":"https://avatars.githubusercontent.com/u/4324516?v=3","gravatar_id":"","url":"https://api.github.com/users/robpike","html_url":"https://github.com/robpike","followers_url":"https://api.github.com/users/robpike/followers","following_url":"https://api.github.com/users/robpike/following{/other_user}","gists_url":"https://api.github.com/users/robpike/gists{/gist_id}","starred_url":"https://api.github.com/users/robpike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robpike/subscriptions","organizations_url":"https://api.github.com/users/robpike/orgs","repos_url":"https://api.github.com/users/robpike/repos","events_url":"https://api.github.com/users/robpike/events{/privacy}","received_events_url":"https://api.github.com/users/robpike/received_events","type":"User","site_admin":false},"repo":{"id":26468385,"name":"ivy","full_name":"robpike/ivy","owner":{"login":"robpike","id":4324516,"avatar_url":"https://avatars.githubusercontent.com/u/4324516?v=3","gravatar_id":"","url":"https://api.github.com/users/robpike","html_url":"https://github.com/robpike","followers_url":"https://api.github.com/users/robpike/followers","following_url":"https://api.github.com/users/robpike/following{/other_user}","gists_url":"https://api.github.com/users/robpike/gists{/gist_id}","starred_url":"https://api.github.com/users/robpike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robpike/subscriptions","organizations_url":"https://api.github.com/users/robpike/orgs","repos_url":"https://api.github.com/users/robpike/repos","events_url":"https://api.github.com/users/robpike/events{/privacy}","received_events_url":"https://api.github.com/users/robpike/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robpike/ivy","description":"ivy, an APL-like calculator","fork":false,"url":"https://api.github.com/repos/robpike/ivy","forks_url":"https://api.github.com/repos/robpike/ivy/forks","keys_url":"https://api.github.com/repos/robpike/ivy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robpike/ivy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robpike/ivy/teams","hooks_url":"https://api.github.com/repos/robpike/ivy/hooks","issue_events_url":"https://api.github.com/repos/robpike/ivy/issues/events{/number}","events_url":"https://api.github.com/repos/robpike/ivy/events","assignees_url":"https://api.github.com/repos/robpike/ivy/assignees{/user}","branches_url":"https://api.github.com/repos/robpike/ivy/branches{/branch}","tags_url":"https://api.github.com/repos/robpike/ivy/tags","blobs_url":"https://api.github.com/repos/robpike/ivy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robpike/ivy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robpike/ivy/git/refs{/sha}","trees_url":"https://api.github.com/repos/robpike/ivy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robpike/ivy/statuses/{sha}","languages_url":"https://api.github.com/repos/robpike/ivy/languages","stargazers_url":"https://api.github.com/repos/robpike/ivy/stargazers","contributors_url":"https://api.github.com/repos/robpike/ivy/contributors","subscribers_url":"https://api.github.com/repos/robpike/ivy/subscribers","subscription_url":"https://api.github.com/repos/robpike/ivy/subscription","commits_url":"https://api.github.com/repos/robpike/ivy/commits{/sha}","git_commits_url":"https://api.github.com/repos/robpike/ivy/git/commits{/sha}","comments_url":"https://api.github.com/repos/robpike/ivy/comments{/number}","issue_comment_url":"https://api.github.com/repos/robpike/ivy/issues/comments/{number}","contents_url":"https://api.github.com/repos/robpike/ivy/contents/{+path}","compare_url":"https://api.github.com/repos/robpike/ivy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robpike/ivy/merges","archive_url":"https://api.github.com/repos/robpike/ivy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robpike/ivy/downloads","issues_url":"https://api.github.com/repos/robpike/ivy/issues{/number}","pulls_url":"https://api.github.com/repos/robpike/ivy/pulls{/number}","milestones_url":"https://api.github.com/repos/robpike/ivy/milestones{/number}","notifications_url":"https://api.github.com/repos/robpike/ivy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robpike/ivy/labels{/name}","releases_url":"https://api.github.com/repos/robpike/ivy/releases{/id}","created_at":"2014-11-11T03:50:43Z","updated_at":"2015-01-05T19:03:43Z","pushed_at":"2015-01-05T05:29:20Z","git_url":"git://github.com/robpike/ivy.git","ssh_url":"git@github.com:robpike/ivy.git","clone_url":"https://github.com/robpike/ivy.git","svn_url":"https://github.com/robpike/ivy","homepage":null,"size":656,"stargazers_count":107,"watchers_count":107,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robpike/ivy/pulls/2"},"html":{"href":"https://github.com/robpike/ivy/pull/2"},"issue":{"href":"https://api.github.com/repos/robpike/ivy/issues/2"},"comments":{"href":"https://api.github.com/repos/robpike/ivy/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/robpike/ivy/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/robpike/ivy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/robpike/ivy/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/robpike/ivy/statuses/0ac5433703e640079b723c552932b7c756e85567"}}}}