gzcom-dll icon indicating copy to clipboard operation
gzcom-dll copied to clipboard

Switch the vector type to EASTL

Open 0xC0000054 opened this issue 5 months ago • 1 comments

I have been testing a few of the methods that take or return std::vector, e.g. cISC4BudgetSimulator::GetAllGroups and cISC4TractDeveloper::GetActiveStyles. These methods cause the game to crash when accessing the internal layout of the C++ type.

I fixed the crash by switching the vector type to the EASTL equivalent, which has the internal layout that SC4 expects. I configured EASTL to use SC4's cIGZAllocatorService for its memory management, which appears to be what the game's vector type uses on Windows.

0xC0000054 avatar Jan 02 '24 09:01 0xC0000054