Closed Ralith closed 2 years ago
When the id of a dangling Entity is larger than any previously allocated from the world, Entities::get would erroneously judge it to be pending, leading insert to attempt access to out-of-bounds location or archetype data.
id
Entities::get
insert
Replicates the same fix applied in https://github.com/Ralith/hecs/pull/244 to Entities::get. get_mut is left as-is as it doesn't handle pending entities.
get_mut
When the
id
of a dangling Entity is larger than any previously allocated from the world,Entities::get
would erroneously judge it to be pending, leadinginsert
to attempt access to out-of-bounds location or archetype data.Replicates the same fix applied in https://github.com/Ralith/hecs/pull/244 to
Entities::get
.get_mut
is left as-is as it doesn't handle pending entities.