Skip to content

Commit

Permalink
fix 'attempted to subtract with overflow' for State::inactives (bevye…
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann authored and ostwilkens committed Jul 27, 2021
1 parent f2acba7 commit 84b47fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ where
}

pub fn inactives(&self) -> &[T] {
&self.stack[0..self.stack.len() - 2]
self.stack.split_last().map(|(_, rest)| rest).unwrap()
}
}

Expand Down

0 comments on commit 84b47fd

Please sign in to comment.