Hello, i have a code where i use casting to std::map to read std::map from memory the code:
std::map<int, Object*>* objectMap = reinterpret_cast<std::map<int, Object*>*>(*reinterpret_cast<__int64*>(
*reinterpret_cast<__int64*>(Globals::baseAddress + ManagerAddress) + MapEntryAddress));
for (auto current : *objectMap) {
auto object = current.second;
...
}
And the problem is, the code works flawlessly when im testing it in debug mode but in release mode its never entering the for loop at all.. I tried to disable opitimization but it didn't help at all. Anyone have any idea what could be wrong there?