Skip to content

Commit

Permalink
Fix #59
Browse files Browse the repository at this point in the history
  • Loading branch information
PixeyeHQ committed Jul 3, 2020
1 parent 6d8d13c commit 9a8bf05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Runtime/LibEcs/EntityMeta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void AddComponent(int type)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void RemoveComponent(int type, int entityID)
{
for (var tRemoveIndex = 0; tRemoveIndex < componentsAmount; tRemoveIndex++)
for (var tRemoveIndex = 0; tRemoveIndex <= componentsAmount; tRemoveIndex++)
{
if (components[tRemoveIndex] == type)
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public void AddGroup(int type)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void RemoveGroup(int type)
{
for (var tRemoveIndex = 0; tRemoveIndex < componentsAmount; tRemoveIndex++)
for (var tRemoveIndex = 0; tRemoveIndex <= componentsAmount; tRemoveIndex++)
{
if (groups[tRemoveIndex] == type)
{
Expand All @@ -100,7 +100,7 @@ public void RemoveGroup(int type)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool AlreadyInGroup(int groupID)
{
for (var gIndex = 0; gIndex < groupsAmount; gIndex++)
for (var gIndex = 0; gIndex <= groupsAmount; gIndex++)
{
if (groups[gIndex] == groupID) return true;
}
Expand Down

0 comments on commit 9a8bf05

Please sign in to comment.