Merged from revision: 6820

Fix: unable to load savegame if more than 255 incidents occured

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6821 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-01-25 16:20:03 +00:00
parent 491050e8c8
commit 518ae3d56b
+2 -2
View File
@@ -619,7 +619,7 @@ Campaign_Stats::Load( HWFILE hwFile )
if( numBytesRead != SIZEOF_CAMPAIGN_STATS_POD )
return(FALSE);
for (UINT8 i = 0; i < usNumIncidents; ++i)
for (UINT32 i = 0; i < usNumIncidents; ++i)
{
Incident_Stats incident;
if ( !incident.Load ( hwFile ) )
@@ -648,7 +648,7 @@ Campaign_Stats::AddNewIncident(Incident_Stats arIncident)
++usNumIncidents;
// update kills/wounds/prisoner numbers
for (UINT i = 0; i < CAMPAIGNHISTORY_SD_MAX; ++i)
for (UINT16 i = 0; i < CAMPAIGNHISTORY_SD_MAX; ++i)
{
usKills[i] += arIncident.usKills[i];
usWounds[i] += arIncident.usWounds[i];