Skip to content

fix: prevent RemoveEntity panic when removing entities carrying tags#28

Merged
ragoune merged 1 commit into
masterfrom
fix/remove-entity-panic-on-tags
Jun 28, 2026
Merged

fix: prevent RemoveEntity panic when removing entities carrying tags#28
ragoune merged 1 commit into
masterfrom
fix/remove-entity-panic-on-tags

Conversation

@ragoune

@ragoune ragoune commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

RemoveEntity looked up world.storage[componentId] for every component of the
entity's archetype.
Tag ids are >= TAGS_INDICES, which is the length of the
storage slice, so removing any tagged entity indexed out of range and panicked.
Skip tag ids (they have no backing storage), mirroring moveComponentsToArchetype.

 RemoveEntity looked up world.storage[componentId] for every component of the
   entity's archetype.
Tag ids are >= TAGS_INDICES, which is the length of the
   storage slice, so removing any tagged entity indexed out of range and panicked.
Skip tag ids (they have no backing storage), mirroring moveComponentsToArchetype.
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
world.go 77.87% <100.00%> (+4.00%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ragoune ragoune merged commit e036d89 into master Jun 28, 2026
4 checks passed
@ragoune ragoune deleted the fix/remove-entity-panic-on-tags branch June 28, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant