Skip to content

Commit

Permalink
Fix a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dguenms committed May 7, 2018
1 parent 2cd3e90 commit 89bda30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified Assets/CvGameCoreDLL.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion CvGameCoreDLL/CvGameTextMgr.cpp
Expand Up @@ -13222,7 +13222,7 @@ void CvGameTextMgr::setBonusTradeHelp(CvWStringBuffer &szBuffer, BonusTypes eBon
{
CvPlayer& kActivePlayer = GET_PLAYER(GC.getGameINLINE().getActivePlayer());

if (pCity != NULL)
if (pCity != NULL && GC.getBonusInfo(eBonus).getAffectedCities() != 0)
{
int iDifference = kActivePlayer.getNumAvailableBonuses(eBonus) * GC.getBonusInfo(eBonus).getAffectedCities() - pCity->getCultureRank();
int iResourceDifference = iDifference > 0 ? iDifference / GC.getBonusInfo(eBonus).getAffectedCities() : std::abs(iDifference) / GC.getBonusInfo(eBonus).getAffectedCities() + 1;
Expand Down

0 comments on commit 89bda30

Please sign in to comment.