Skip to content

Commit ed36c21

Browse files
fix 'attempted to subtract with overflow' for State::inactives (#1668)
1 parent 6a4051b commit ed36c21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ecs/src/schedule/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ where
378378
}
379379

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

0 commit comments

Comments
 (0)