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

Prevent hanging timer events with repeat #7009

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

samme
Copy link
Contributor

@samme samme commented Jan 15, 2025

This PR

  • Fixes a bug

I improved the check in TimerEvent#reset() and added a check in Clock#addEvent().

Fixes #7004.

Also reject negative delays

Fixes phaserjs#7004
@zekeatchan zekeatchan merged commit 748b7a6 into phaserjs:master Jan 16, 2025
@zekeatchan
Copy link
Collaborator

Thanks @samme for the PR. It has been merged with the master branch.

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.

A TimerEvent with a delay of 0 and repeat of -1 causes an infinite loop
2 participants