Skip to content

Commit

Permalink
fix 'attempted to subtract with overflow' for State::inactives (#1668)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Apr 10, 2021
1 parent 6a4051b commit ed36c21
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 ed36c21

Please sign in to comment.