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

[NO SQUASH] Inventory: Fix assertion caused by a no-op stack movement #13717

Merged
merged 2 commits into from Aug 27, 2023

Conversation

SmallJoker
Copy link
Member

Fixes #13716

Moving a stack onto itself caused the assertion to fail because it cannot be swapped with itself. Hence such operations are now all considered as no-ops.

To do

This PR is Ready for Review.

How to test

  1. As described in Assertion crash when splitting maximal itemstack with mouse shortcut #13716

The list of dragged stacks includes the source stack, which
however does not need to be moved onto itself.
This is an optimization.
@SmallJoker SmallJoker changed the title Inventory: Fix assertion caused by a no-op stack movement [NO SQUASH] Inventory: Fix assertion caused by a no-op stack movement Aug 27, 2023
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

lgtm

@sfan5 sfan5 merged commit bf9f831 into minetest:master Aug 27, 2023
13 checks passed
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.

Assertion crash when splitting maximal itemstack with mouse shortcut
2 participants