summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ecs.cpp4
-rw-r--r--src/game.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ecs.cpp b/src/ecs.cpp
index 9d7b321..bbb1a70 100644
--- a/src/ecs.cpp
+++ b/src/ecs.cpp
@@ -38,7 +38,7 @@ void ECS_Init() {
}
uint64_t ECS_GetEntities_BucketCount() {
- return Entities_BucketContainer.bucketCounter;
+ return Entities_BucketContainer.bucketCounter + 1;
}
Entity *ECS_GetEntities(uint64_t bucketIndex, uint64_t &itemCount) {
assert(bucketIndex <= Entities_BucketContainer.bucketCounter);
@@ -233,7 +233,7 @@ CompGrBinds *ECS_GetGrBinds(EntityHandle entHandle) {
}
uint64_t ECS_GetGrBinds_BucketCount() {
- return Comp_GrBinds_BucketContainer.bucketCounter;
+ return Comp_GrBinds_BucketContainer.bucketCounter + 1;
}
CompGrBinds *ECS_GetGrBinds(uint64_t bucketIndex, uint64_t &itemCount) {
diff --git a/src/game.cpp b/src/game.cpp
index db81e47..9298b26 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -280,7 +280,7 @@ void RecordImGuiEntityList() {
ImGui::TableHeadersRow();
uint64_t bucketCount = ECS_GetEntities_BucketCount();
- for (long bucket = 0; bucket <= bucketCount; ++bucket) {
+ for (long bucket = 0; bucket < bucketCount; ++bucket) {
uint64_t itemCount = 0;
auto *entities = ECS_GetEntities(bucket, itemCount);
for (long row = 0; row < itemCount; row++) {