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

Date __eq function may get called with values other than Date. #2293

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

Alberth289346
Copy link
Contributor

*Fixes #2290

Describe what the proposed change does

  • We should check the arguments of the compare functions for being Date instances, but that crashes with infinite recursion in Lua 5.3.
  • Instead we check for the same __eq functions which works too under the assumption that at least one of the parameters is a Date instance.

@TheCycoONE TheCycoONE merged commit 7f72153 into CorsixTH:master Nov 15, 2022
@Alberth289346 Alberth289346 deleted the avoid-date-compare-crash branch November 15, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Meta-table Date compare function crashes
3 participants