Ticket #3407: 3407.patch

File 3407.patch, 648 bytes (added by s0600204, 9 years ago)

Proposed fix

  • source/simulation2/components/CCmpTerritoryManager.cpp

     
    540540    if (m_TerritoryTotalPassableCellCount == 0)
    541541        CalculateTerritories();
    542542
     543    // If it is still 0, then we return 0
     544    if (m_TerritoryTotalPassableCellCount == 0)
     545        return 0;
     546
    543547    ENSURE(m_TerritoryTotalPassableCellCount > 0);
    544548    u8 percentage = (m_TerritoryCellCounts[player] * 100) / m_TerritoryTotalPassableCellCount;
    545549    ENSURE(percentage <= 100);