Description
I was testing with jmarshall2323's fork, however the bug exists in the original source code
Affected Files:
Generals/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
GeneralsMD/Code/GameEngine/Source/Common/RTS/ResourceGatheringManager.cpp
the function findBestSupplyCenter
seems to have been copied from findBestSupplyWarehouse
the specified line above seems to have been left unmodified after being copied, so it is using an iterator of m_supplyCenters
to erase an element in m_supplyWarehouses
this throws an error in modern builds (jmarshall2323's) but I have no clue what it would have done back in the day with VS6.0 era STL
this does not affect game play in anyway, as the loop will just skip it and keep going, at wrost it would be slightly slower, but with modern versions it throws an exception as this is an illegal write
solution:
basically replace m_supplyWarehouses
with m_supplyCenters
at both of those lines as this is the correct behavior