BUG FIX: Incorrect arithmetic logic/type
Bit twiddling is wrong bc expression will never be negative as it's uint8.
Swapped with ternary expression for both clarity (won't actually branch; compiler will convert to fmad)
@@ -1531,7 +1531,7 @@ int32_t update_entity_index(
ecs_record_t *record_ptr = ecs_get_entity(world, stage, e);
if (record_ptr) {
src_row = record_ptr->row;
- uint8_t is_monitored = 1 - (src_row < 0) * 2;
+ int8_t is_monitored = (src_row < 0) ? -1 : 1;
src_row = (src_row * is_monitored) - 1;
ecs_assert(src_row >= 0, ECS_INTERNAL_ERROR, NULL);
