Skip to content
New issue

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

loopHighlight doesn't have any loop protection #22752

Merged
merged 1 commit into from May 30, 2018
Merged

Conversation

joshlory
Copy link
Contributor

Follow up to PR #22463. That PR fixed Artist puzzles (example) but @jmschulte found that Maze puzzles (example) could still infinitely loop.

It looks like Maze used Maze.loopHighlight(%1); which doesn't actually protect against infinite loops. Changed to use the loop trap instead.

@joshlory joshlory requested a review from Hamms May 30, 2018 18:49
@Hamms
Copy link
Contributor

Hamms commented May 30, 2018

What was the purpose of loopHighlight? Can it be removed?

@joshlory
Copy link
Contributor Author

It's still used by the maze_forever block:

branch = codegen.loopTrap() + codegen.loopHighlight('Maze', this.id) + branch;

@joshlory joshlory merged commit 5bdb8c3 into staging May 30, 2018
@joshlory joshlory deleted the maze-loop-trap branch May 30, 2018 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants