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

Error in loading_screen.rs example #16792

Closed
muttering-oldman opened this issue Dec 12, 2024 · 0 comments · Fixed by #16989
Closed

Error in loading_screen.rs example #16792

muttering-oldman opened this issue Dec 12, 2024 · 0 comments · Fixed by #16989
Assignees
Labels
C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon

Comments

@muttering-oldman
Copy link

Bevy version

v0.15.0

What went wrong

I think there is an error in the example on line 220.
If there are two elements in the array and the zero element is deleted on the first iteration, then on the second iteration an attempt to delete the element with index 1 will end with a panic because the deletion of the zero element caused a shift.

@muttering-oldman muttering-oldman added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 12, 2024
@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Straightforward Simple bug fixes and API improvements, docs, test and examples X-Uncontroversial This work is generally agreed upon and removed S-Needs-Triage This issue needs to be labelled labels Dec 12, 2024
@BenjaminBrienen BenjaminBrienen self-assigned this Dec 27, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 31, 2024
# Objective

Fix #16792

## Solution

Fix the logic to retain loaded ones

## Testing

Unable to test due to #16988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants