GitHub PullRequestEvent at 2014-08-18 16:26:41
Repository: simutrans-experimental
Actor: pipcet
Payload: {"action":"opened","number":23,"pull_request":{"url":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23","id":19928561,"html_url":"https://github.com/jamespetts/simutrans-experimental/pull/23","diff_url":"https://github.com/jamespetts/simutrans-experimental/pull/23.diff","patch_url":"https://github.com/jamespetts/simutrans-experimental/pull/23.patch","issue_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/23","number":23,"state":"open","locked":false,"title":"FIX: make sure we call register_stops when changing schedules","user":{"login":"pipcet","id":4129208,"avatar_url":"https://avatars.githubusercontent.com/u/4129208?v=2","gravatar_id":"360b125132fd3ad820ca50f5c0ab7e4a","url":"https://api.github.com/users/pipcet","html_url":"https://github.com/pipcet","followers_url":"https://api.github.com/users/pipcet/followers","following_url":"https://api.github.com/users/pipcet/following{/other_user}","gists_url":"https://api.github.com/users/pipcet/gists{/gist_id}","starred_url":"https://api.github.com/users/pipcet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipcet/subscriptions","organizations_url":"https://api.github.com/users/pipcet/orgs","repos_url":"https://api.github.com/users/pipcet/repos","events_url":"https://api.github.com/users/pipcet/events{/privacy}","received_events_url":"https://api.github.com/users/pipcet/received_events","type":"User","site_admin":false},"body":"This one is slightly tricky: when closing the schedule window, convoi_t::step calls set_schedule with fpl == f, but the schedule has still changed; a copy of the old schedule is stored in old_fpl, and this patch very temporarily restores it to compare against that instead.\r\n\r\nWithout the patch, you could cause a fatal index error by doing this:\r\n * create three stops: A, B, and C\r\n * create a line connecting A to B\r\n * create a convoy with a schedule containing A, B, and C\r\n * wait for the convoy to visit C\r\n * edit the convoy's schedule to consist only of A and B (it will automatically revert to being on the line)\r\n * wait for the convoy to visit the next stop\r\n\r\nAt that point, the departures map would contain an entry with iter.key.entry == 2, but the schedule would contain only two stops. This line in convoi_t::laden would then cause the error:\r\n\r\n    const koord3d halt_position = fpl->eintrag.get_element(iter.key.entry).pos;\r\n\r\nA better fix might be to make the schedule window operate on a copy of the schedule, not the actual convoy's schedule, but I've gone for the easiest fix.\r\n\r\nI'm pretty sure this isn't present in Standard.","created_at":"2014-08-18T16:26:41Z","updated_at":"2014-08-18T16:26:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23/commits","review_comments_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23/comments","review_comment_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/23/comments","statuses_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/statuses/a299eb9841bfeefed1b1707ff6323f63ed595ca7","head":{"label":"pipcet:james-fpl","ref":"james-fpl","sha":"a299eb9841bfeefed1b1707ff6323f63ed595ca7","user":{"login":"pipcet","id":4129208,"avatar_url":"https://avatars.githubusercontent.com/u/4129208?v=2","gravatar_id":"360b125132fd3ad820ca50f5c0ab7e4a","url":"https://api.github.com/users/pipcet","html_url":"https://github.com/pipcet","followers_url":"https://api.github.com/users/pipcet/followers","following_url":"https://api.github.com/users/pipcet/following{/other_user}","gists_url":"https://api.github.com/users/pipcet/gists{/gist_id}","starred_url":"https://api.github.com/users/pipcet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipcet/subscriptions","organizations_url":"https://api.github.com/users/pipcet/orgs","repos_url":"https://api.github.com/users/pipcet/repos","events_url":"https://api.github.com/users/pipcet/events{/privacy}","received_events_url":"https://api.github.com/users/pipcet/received_events","type":"User","site_admin":false},"repo":{"id":12987129,"name":"simutrans-experimental","full_name":"pipcet/simutrans-experimental","owner":{"login":"pipcet","id":4129208,"avatar_url":"https://avatars.githubusercontent.com/u/4129208?v=2","gravatar_id":"360b125132fd3ad820ca50f5c0ab7e4a","url":"https://api.github.com/users/pipcet","html_url":"https://github.com/pipcet","followers_url":"https://api.github.com/users/pipcet/followers","following_url":"https://api.github.com/users/pipcet/following{/other_user}","gists_url":"https://api.github.com/users/pipcet/gists{/gist_id}","starred_url":"https://api.github.com/users/pipcet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipcet/subscriptions","organizations_url":"https://api.github.com/users/pipcet/orgs","repos_url":"https://api.github.com/users/pipcet/repos","events_url":"https://api.github.com/users/pipcet/events{/privacy}","received_events_url":"https://api.github.com/users/pipcet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pipcet/simutrans-experimental","description":"Sources for the Experimental branch of the popular game Simutrans","fork":true,"url":"https://api.github.com/repos/pipcet/simutrans-experimental","forks_url":"https://api.github.com/repos/pipcet/simutrans-experimental/forks","keys_url":"https://api.github.com/repos/pipcet/simutrans-experimental/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pipcet/simutrans-experimental/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pipcet/simutrans-experimental/teams","hooks_url":"https://api.github.com/repos/pipcet/simutrans-experimental/hooks","issue_events_url":"https://api.github.com/repos/pipcet/simutrans-experimental/issues/events{/number}","events_url":"https://api.github.com/repos/pipcet/simutrans-experimental/events","assignees_url":"https://api.github.com/repos/pipcet/simutrans-experimental/assignees{/user}","branches_url":"https://api.github.com/repos/pipcet/simutrans-experimental/branches{/branch}","tags_url":"https://api.github.com/repos/pipcet/simutrans-experimental/tags","blobs_url":"https://api.github.com/repos/pipcet/simutrans-experimental/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pipcet/simutrans-experimental/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pipcet/simutrans-experimental/git/refs{/sha}","trees_url":"https://api.github.com/repos/pipcet/simutrans-experimental/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pipcet/simutrans-experimental/statuses/{sha}","languages_url":"https://api.github.com/repos/pipcet/simutrans-experimental/languages","stargazers_url":"https://api.github.com/repos/pipcet/simutrans-experimental/stargazers","contributors_url":"https://api.github.com/repos/pipcet/simutrans-experimental/contributors","subscribers_url":"https://api.github.com/repos/pipcet/simutrans-experimental/subscribers","subscription_url":"https://api.github.com/repos/pipcet/simutrans-experimental/subscription","commits_url":"https://api.github.com/repos/pipcet/simutrans-experimental/commits{/sha}","git_commits_url":"https://api.github.com/repos/pipcet/simutrans-experimental/git/commits{/sha}","comments_url":"https://api.github.com/repos/pipcet/simutrans-experimental/comments{/number}","issue_comment_url":"https://api.github.com/repos/pipcet/simutrans-experimental/issues/comments/{number}","contents_url":"https://api.github.com/repos/pipcet/simutrans-experimental/contents/{+path}","compare_url":"https://api.github.com/repos/pipcet/simutrans-experimental/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pipcet/simutrans-experimental/merges","archive_url":"https://api.github.com/repos/pipcet/simutrans-experimental/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pipcet/simutrans-experimental/downloads","issues_url":"https://api.github.com/repos/pipcet/simutrans-experimental/issues{/number}","pulls_url":"https://api.github.com/repos/pipcet/simutrans-experimental/pulls{/number}","milestones_url":"https://api.github.com/repos/pipcet/simutrans-experimental/milestones{/number}","notifications_url":"https://api.github.com/repos/pipcet/simutrans-experimental/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pipcet/simutrans-experimental/labels{/name}","releases_url":"https://api.github.com/repos/pipcet/simutrans-experimental/releases{/id}","created_at":"2013-09-21T00:54:14Z","updated_at":"2013-10-05T16:02:08Z","pushed_at":"2014-08-18T16:01:33Z","git_url":"git://github.com/pipcet/simutrans-experimental.git","ssh_url":"git@github.com:pipcet/simutrans-experimental.git","clone_url":"https://github.com/pipcet/simutrans-experimental.git","svn_url":"https://github.com/pipcet/simutrans-experimental","homepage":"http://forum.simutrans.com/index.php?board=53.0","size":61028,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"jamespetts:way-improvements","ref":"way-improvements","sha":"7c4f688cbfd82609eebd328d6d195a19a92418c7","user":{"login":"jamespetts","id":49606,"avatar_url":"https://avatars.githubusercontent.com/u/49606?v=2","gravatar_id":"0bfb9792c0b5c5350da5087c8ce12418","url":"https://api.github.com/users/jamespetts","html_url":"https://github.com/jamespetts","followers_url":"https://api.github.com/users/jamespetts/followers","following_url":"https://api.github.com/users/jamespetts/following{/other_user}","gists_url":"https://api.github.com/users/jamespetts/gists{/gist_id}","starred_url":"https://api.github.com/users/jamespetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamespetts/subscriptions","organizations_url":"https://api.github.com/users/jamespetts/orgs","repos_url":"https://api.github.com/users/jamespetts/repos","events_url":"https://api.github.com/users/jamespetts/events{/privacy}","received_events_url":"https://api.github.com/users/jamespetts/received_events","type":"User","site_admin":false},"repo":{"id":115925,"name":"simutrans-experimental","full_name":"jamespetts/simutrans-experimental","owner":{"login":"jamespetts","id":49606,"avatar_url":"https://avatars.githubusercontent.com/u/49606?v=2","gravatar_id":"0bfb9792c0b5c5350da5087c8ce12418","url":"https://api.github.com/users/jamespetts","html_url":"https://github.com/jamespetts","followers_url":"https://api.github.com/users/jamespetts/followers","following_url":"https://api.github.com/users/jamespetts/following{/other_user}","gists_url":"https://api.github.com/users/jamespetts/gists{/gist_id}","starred_url":"https://api.github.com/users/jamespetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamespetts/subscriptions","organizations_url":"https://api.github.com/users/jamespetts/orgs","repos_url":"https://api.github.com/users/jamespetts/repos","events_url":"https://api.github.com/users/jamespetts/events{/privacy}","received_events_url":"https://api.github.com/users/jamespetts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamespetts/simutrans-experimental","description":"Sources for the Experimental branch of the popular game Simutrans","fork":true,"url":"https://api.github.com/repos/jamespetts/simutrans-experimental","forks_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/forks","keys_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/teams","hooks_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/hooks","issue_events_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/events{/number}","events_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/events","assignees_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/assignees{/user}","branches_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/branches{/branch}","tags_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/tags","blobs_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/statuses/{sha}","languages_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/languages","stargazers_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/stargazers","contributors_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/contributors","subscribers_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/subscribers","subscription_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/subscription","commits_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/comments/{number}","contents_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/contents/{+path}","compare_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/merges","archive_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/downloads","issues_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues{/number}","pulls_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls{/number}","milestones_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/milestones{/number}","notifications_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/labels{/name}","releases_url":"https://api.github.com/repos/jamespetts/simutrans-experimental/releases{/id}","created_at":"2009-01-27T18:38:03Z","updated_at":"2014-08-09T22:57:39Z","pushed_at":"2014-08-17T19:12:17Z","git_url":"git://github.com/jamespetts/simutrans-experimental.git","ssh_url":"git@github.com:jamespetts/simutrans-experimental.git","clone_url":"https://github.com/jamespetts/simutrans-experimental.git","svn_url":"https://github.com/jamespetts/simutrans-experimental","homepage":"http://forum.simutrans.com/index.php?board=53.0","size":76698,"stargazers_count":25,"watchers_count":25,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":15,"mirror_url":null,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23"},"html":{"href":"https://github.com/jamespetts/simutrans-experimental/pull/23"},"issue":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/23"},"comments":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/jamespetts/simutrans-experimental/statuses/a299eb9841bfeefed1b1707ff6323f63ed595ca7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":7,"deletions":0,"changed_files":1}}