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

[Merged by Bors] - Fix end-of-animation index OOB #6210

Closed
wants to merge 1 commit into from
Closed

[Merged by Bors] - Fix end-of-animation index OOB #6210

wants to merge 1 commit into from

Conversation

thebluefish
Copy link
Contributor

Objective

Fixes #6204

Solution

Added another branch to handle end-of-animation special case

@thebluefish
Copy link
Contributor Author

So I'm actually unsure if this was the best way to write that line as the binary search could only ever return at most the final index - same with the Err(n) check.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Animation Make things move and change over time labels Oct 9, 2022
@alice-i-cecile
Copy link
Member

So I'm actually unsure if this was the best way to write that line as the binary search could only ever return at most the final index - same with the Err(n) check.

IMO it's better to code defensively; this behavior may change in the future, so we should be robust to being passed bad data here.

@mockersf
Copy link
Member

mockersf commented Oct 9, 2022

IMO it's better to code defensively

In this case it's defensive coding against Rust std...

Checking for equality could be faster

@alice-i-cecile
Copy link
Member

Could we use more robust error handling than indexing downstream too? I try to avoid it, precisely because it subtly panics.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot pushed a commit that referenced this pull request Oct 17, 2022
# Objective

Fixes #6204

## Solution

Added another branch to handle end-of-animation special case
@bors bors bot changed the title Fix end-of-animation index OOB [Merged by Bors] - Fix end-of-animation index OOB Oct 17, 2022
@bors bors bot closed this Oct 17, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 19, 2022
# Objective

Fixes bevyengine#6204

## Solution

Added another branch to handle end-of-animation special case
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

Fixes bevyengine#6204

## Solution

Added another branch to handle end-of-animation special case
Pietrek14 pushed a commit to Pietrek14/bevy that referenced this pull request Dec 17, 2022
# Objective

Fixes bevyengine#6204

## Solution

Added another branch to handle end-of-animation special case
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Fixes bevyengine#6204

## Solution

Added another branch to handle end-of-animation special case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

index out of bounds : for animation_player, irregular bug
3 participants