We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frosch opened the ticket and wrote:
ChooChoo uses this comparator: function CompareRouteValue(a, b) { return a.payback > b.payback ? 1 : -1; } It causes an infinite loop in _hsort_sift_down when root == root2 == bottom == maxChild since comparing an element with itself returned -1.
ChooChoo uses this comparator:
function CompareRouteValue(a, b) { return a.payback > b.payback ? 1 : -1; }
It causes an infinite loop in _hsort_sift_down when root == root2 == bottom == maxChild since comparing an element with itself returned -1.
Reported version: trunk Operating system: All
The text was updated successfully, but these errors were encountered:
Rubidium wrote:
Simplified version that triggers this in Squirrel: function Cmp(a, b) { return a > b ? 1 : -1 } local arr = [ 1, 0 ]; arr.sort(Cmp);
Simplified version that triggers this in Squirrel:
function Cmp(a, b) { return a > b ? 1 : -1 } local arr = [ 1, 0 ]; arr.sort(Cmp);
Sorry, something went wrong.
Possible fix
Attachments
Rubidium closed the ticket.
Reason for closing: Fixed
In r23870
No branches or pull requests
frosch opened the ticket and wrote:
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/5004
The text was updated successfully, but these errors were encountered: