BUGFIX 514 - A vector error in the size of the world inventory was causing a mouse button to be deleted twice resulting in an assertion error.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4485 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2011-06-07 18:16:56 +00:00
parent 61fac0c0f8
commit b8e5ebcf6c
+1 -1
View File
@@ -1020,7 +1020,7 @@ void BeginSellAllCallBack( UINT8 bExitValue )
{
return;
}
for(UINT32 wItem = 0; wItem < guiNumWorldItems; wItem++) //WS TODO: is "for(UINT32 wItem = 0; wItem < pInventoryPoolList.size(); wItem++)" better? It resolved a bug in the old SVN, but things have changed now. (It was likely only fighting symptons anyway)
for(UINT32 wItem = 0; wItem < pInventoryPoolList.size(); wItem++) //CHRISL: It's safer to use pInventoryPoolList.size() versus guiNumWorldItems as it avoids any possibility of a vector size error
{
if(pInventoryPoolList[wItem].object.exists() == true && (pInventoryPoolList[wItem].usFlags & WORLD_ITEM_REACHABLE))
{