Skip to content

Commit

Permalink
Add wrapping_add to change_tick (bevyengine#7146)
Browse files Browse the repository at this point in the history
# Objective

Fixes bevyengine#7140


## Solution

As discussed in the issue, added wrapping_add

---
  • Loading branch information
Tirthnp authored and alradish committed Jan 22, 2023
1 parent 98c4ab0 commit 676982c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/exclusive_function_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ where

let change_tick = world.change_tick.get_mut();
self.system_meta.last_change_tick = *change_tick;
*change_tick += 1;
*change_tick = change_tick.wrapping_add(1);
world.last_change_tick = saved_last_tick;
}

Expand Down

0 comments on commit 676982c

Please sign in to comment.