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

Reversed item iteration. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PhaserArray
Copy link

@PhaserArray PhaserArray commented Oct 17, 2017

Iterating from forwards is a bad idea when you are also removing the items as the indices will shift and you will skip over items. Here's an example of the current behavior: https://i.imgur.com/3W8msXm.png

This reverses the loop and fixes that issue, example: https://i.imgur.com/LScMeqt.png

Fixes #1

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.

/forcedrop only drops about half the items when there are multiple of said item.
1 participant