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 jihiggins committed Apr 18, 2021
1 parent c9eb2c1 commit 57bbf69
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 57bbf69

Please sign in to comment.