1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix potentially uninitialized values

This commit is contained in:
Ivan Savenko
2024-02-12 12:31:27 +02:00
parent dc8d48a3b6
commit c577ea3e8d
4 changed files with 16 additions and 15 deletions

View File

@@ -843,6 +843,7 @@ ExchangeCandidate HeroChainCalculationTask::calculateExchange(
candidate.turns = carrierParentNode->turns;
candidate.setCost(carrierParentNode->getCost() + otherParentNode->getCost() / 1000.0);
candidate.moveRemains = carrierParentNode->moveRemains;
candidate.danger = carrierParentNode->danger;
if(carrierParentNode->turns < otherParentNode->turns)
{