{"action":"reopened","issue":{"url":"https://api.github.com/repos/Ohohcakester/ENLSVG-Pathfinding/issues/1","repository_url":"https://api.github.com/repos/Ohohcakester/ENLSVG-Pathfinding","labels_url":"https://api.github.com/repos/Ohohcakester/ENLSVG-Pathfinding/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Ohohcakester/ENLSVG-Pathfinding/issues/1/comments","events_url":"https://api.github.com/repos/Ohohcakester/ENLSVG-Pathfinding/issues/1/events","html_url":"https://github.com/Ohohcakester/ENLSVG-Pathfinding/issues/1","id":270272797,"number":1,"title":"data range overflow cause infinite loop","user":{"login":"MoreGames","id":24757069,"avatar_url":"https://avatars2.githubusercontent.com/u/24757069?v=4","gravatar_id":"","url":"https://api.github.com/users/MoreGames","html_url":"https://github.com/MoreGames","followers_url":"https://api.github.com/users/MoreGames/followers","following_url":"https://api.github.com/users/MoreGames/following{/other_user}","gists_url":"https://api.github.com/users/MoreGames/gists{/gist_id}","starred_url":"https://api.github.com/users/MoreGames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoreGames/subscriptions","organizations_url":"https://api.github.com/users/MoreGames/orgs","repos_url":"https://api.github.com/users/MoreGames/repos","events_url":"https://api.github.com/users/MoreGames/events{/privacy}","received_events_url":"https://api.github.com/users/MoreGames/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-01T11:03:30Z","updated_at":"2017-11-04T13:30:11Z","closed_at":null,"author_association":"NONE","body":"While testing your algorithm and implementation on a middle large area, I noticed a problem in line\r\n\r\n`if (rightBound <= right) break; // right < rightBound `\r\n\r\n(line numer 422) in file LineOfSightScanner.cpp\r\n\r\nIn the underlying comparison\r\n\r\n`return o.d*n > o.n*d;`\r\n\r\nof the Fraction objects, the data range of int is easily exceeded, which can lead to negative numbers where there should be positive ones, which can lead to a comparison result of false instead of true, which can lead to an infinite loop.\r\n\r\nI changed n and d of the Fraction class to long long for a simple solution to the problem (ignoring some implicit casts with potential data loss); for sure not the best way.\r\n\r\nMaybe you can update your implementation for these cases.\r\n\r\nGreat work, easy to use, extensive description!"}}
{"actor":{"display_login":"Ohohcakester"}}