Godzil 3 年 前
コミット
d6f80c3d08
1 ファイル変更1 行追加1 行削除
  1. 1 1
      source/include/ECS.h

+ 1 - 1
source/include/ECS.h

@@ -126,7 +126,7 @@ template<typename T, typename ...TArgs> void Registry::addComponent(Entity entit
     /* Check the pool is big enough */
     if (componentId >= this->componentPools.size())
     {
-        this->componentPools.reserve(componentId + 1, nullptr);
+        this->componentPools.resize(componentId + 1, nullptr);
     }
 
     /* Is this component exist in the pool? */