diff --git a/Source/Contents/Effects/EffectLists.cpp b/Source/Contents/Effects/EffectLists.cpp index 2799effc..9006deca 100644 --- a/Source/Contents/Effects/EffectLists.cpp +++ b/Source/Contents/Effects/EffectLists.cpp @@ -463,6 +463,7 @@ public: template struct CEffectAllocator : CAllocator { + CEffectAllocator() {} CEffect* Create() override; }; @@ -5024,9 +5025,11 @@ bool EffectLists::RegisterAllocators() { return false; } - std::vector ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds(); - for (int id : ez2strEffects) { - this->RegisterAllocator(id, new (std::nothrow) CEffectAllocator); + { + std::vector ez2strEffects = CEZ2STREffectMgr::GetInstance()->EffectIds(); + for (auto id = ez2strEffects.begin(); id != ez2strEffects.end(); ++id) { + this->RegisterAllocator(*id, new (std::nothrow) CEffectAllocator); + } } if (!this->RegisterAllocator(EF_UNK_2348, new (std::nothrow) CEffectAllocator)) {