From 8e3b3653000e8ec879dc28f1b26bf1f6b5796577 Mon Sep 17 00:00:00 2001 From: Tirth Patel Date: Tue, 10 Jan 2023 01:42:58 -0330 Subject: [PATCH] Add wrapping_add to change_tick --- crates/bevy_ecs/src/system/exclusive_function_system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/system/exclusive_function_system.rs b/crates/bevy_ecs/src/system/exclusive_function_system.rs index 272b9bce17eff..9a8fdccfae92f 100644 --- a/crates/bevy_ecs/src/system/exclusive_function_system.rs +++ b/crates/bevy_ecs/src/system/exclusive_function_system.rs @@ -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; }