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

Fix waypoint precision wraparound, add bounds check #14244

Merged
merged 1 commit into from Jan 21, 2024

Conversation

appgurueu
Copy link
Contributor

While testing hud_get_all, I found that for waypoints without a precision field, the -1 wraps around and we get 2^32 - 1.

How to test

Add waypoint without precision, get precision. You should get 10 rather than 2^32 - 1.

@appgurueu appgurueu added Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines Bugfix 🐛 PRs that fix a bug labels Jan 11, 2024
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM.

@appgurueu appgurueu merged commit fb461d2 into minetest:master Jan 21, 2024
13 checks passed
@appgurueu appgurueu deleted the fix-wraparound branch January 21, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug One approval ✅ ◻️ @ Script API Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants