Fix end-of-animation index OOB (#6210)
# Objective Fixes #6204 ## Solution Added another branch to handle end-of-animation special case
This commit is contained in:
parent
b09b2c1056
commit
c6e0da4bcb
@ -243,6 +243,7 @@ pub fn animation_player(
|
||||
.keyframe_timestamps
|
||||
.binary_search_by(|probe| probe.partial_cmp(&elapsed).unwrap())
|
||||
{
|
||||
Ok(n) if n >= curve.keyframe_timestamps.len() - 1 => continue, // this curve is finished
|
||||
Ok(i) => i,
|
||||
Err(0) => continue, // this curve isn't started yet
|
||||
Err(n) if n > curve.keyframe_timestamps.len() - 1 => continue, // this curve is finished
|
||||
|
Loading…
Reference in New Issue
Block a user