diff --git a/DragonECS.csproj b/DragonECS.csproj
index 55f91c7..2722d48 100644
--- a/DragonECS.csproj
+++ b/DragonECS.csproj
@@ -10,7 +10,7 @@
DCFApixels.DragonECS
DragonECS
- 0.8.41
+ 0.8.42
DCFApixels
ECS Framework for Game Engines with C# and .Net Platform
DCFApixels
diff --git a/package.json b/package.json
index 0610af7..dc6af0d 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"displayName": "DragonECS",
"description": "C# Entity Component System Framework",
"unity": "2020.3",
- "version": "0.8.41",
+ "version": "0.8.42",
"repository": {
"type": "git",
"url": "https://github.com/DCFApixels/DragonECS.git"
diff --git a/src/Collections/EcsGroup.cs b/src/Collections/EcsGroup.cs
index f1e0ec1..0bd8715 100644
--- a/src/Collections/EcsGroup.cs
+++ b/src/Collections/EcsGroup.cs
@@ -372,16 +372,15 @@ namespace DCFApixels.DragonECS
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public EcsSpan Slice(int start)
{
- return Slice(start, _count - start + 1);
+ return Slice(start, _count - start);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public EcsSpan Slice(int start, int length)
{
- start++;
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
- if (start < 1 || start + length > _count) { Throw.ArgumentOutOfRange(); }
+ if (start < 0 || start + length > _count) { Throw.ArgumentOutOfRange(); }
#endif
- return new EcsSpan(WorldID, _dense, start, length);
+ return new EcsSpan(WorldID, _dense, start + 1, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public EcsSpan ToSpan()