Skip to content

Commit

Permalink
Related to bug #896285:
Browse files Browse the repository at this point in the history
properly set the Count when copying the vector. Why the hell did it work for me then?
  • Loading branch information
DCoderLT committed Mar 2, 2012
1 parent 87b0b05 commit 0877397
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ares.version.h
Expand Up @@ -2,8 +2,8 @@
#define VERSION_H

#define VERSION_MAJOR 12
#define VERSION_MINOR 61
#define VERSION_REVISION 1040
#define VERSION_MINOR 62
#define VERSION_REVISION 360

#define SAVEGAME_MAGIC ((VERSION_MAJOR << 24) | (VERSION_MINOR << 16) | (VERSION_REVISION))

Expand Down
1 change: 1 addition & 0 deletions src/Ext/HouseType/Body.cpp
Expand Up @@ -306,6 +306,7 @@ void CopyVector(T HouseTypeExt::ExtData::* prop, const HouseTypeExt::ExtData *sr
auto &sp = src->*prop;
auto &dp = dst->*prop;
dp.SetCapacity(sp.Capacity, NULL);
dp.Count = sp.Count;
for(unsigned ix = sp.Count; ix > 0; --ix) {
auto idx = ix - 1;
dp.Items[idx] = sp.Items[idx];
Expand Down
1 change: 1 addition & 0 deletions src/Ext/HouseType/Hooks.cpp
Expand Up @@ -196,6 +196,7 @@ DEFINE_HOOK(4FE782, HTExt_PickPowerplant, 6)
pResult = Eligible.at(idx);
} else if(pData->Powerplants.Count) {
pResult = pData->Powerplants[0];
Debug::Log("Country [%s] wanted to build a powerplant but does not meet prerequisites for any possible plant. Going to give it the first one on the list (%s)\n", H->Type->ID, pResult->ID);
} else {
Debug::Log("Country [%s] did not find any powerplants it could construct! The AI's probably going to crash now...\n", H->Type->ID);
}
Expand Down

0 comments on commit 0877397

Please sign in to comment.