From 518ae3d56b2ecf5ff4028c8ebdf1c38d8808bfdb Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 25 Jan 2014 16:20:03 +0000 Subject: [PATCH] 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 --- Laptop/CampaignStats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Laptop/CampaignStats.cpp b/Laptop/CampaignStats.cpp index 29f55e90..a5738685 100644 --- a/Laptop/CampaignStats.cpp +++ b/Laptop/CampaignStats.cpp @@ -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];