ecs: saturated add

Fixes #409
This commit is contained in:
Ali Chraghi 2023-01-15 08:39:40 +03:30 committed by Stephen Gutekanst
parent 10d5f344e3
commit 168a84805a

View file

@ -116,7 +116,7 @@ pub const ArchetypeStorage = struct {
if (better_capacity >= new_capacity) return;
while (true) {
better_capacity += better_capacity / 2 + 8;
better_capacity +|= better_capacity / 2 + 8;
if (better_capacity >= new_capacity) break;
}