Переглянути джерело

Replace uint64_t with signed type to prevent overflow on substraction

Ivan Savenko 1 рік тому
батько
коміт
7445e950ba
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      AI/Nullkiller/Analyzers/ArmyManager.h

+ 1 - 1
AI/Nullkiller/Analyzers/ArmyManager.h

@@ -32,7 +32,7 @@ struct SlotInfo
 struct ArmyUpgradeInfo
 struct ArmyUpgradeInfo
 {
 {
 	std::vector<SlotInfo> resultingArmy;
 	std::vector<SlotInfo> resultingArmy;
-	uint64_t upgradeValue = 0;
+	int64_t upgradeValue = 0;
 	TResources upgradeCost;
 	TResources upgradeCost;
 
 
 	void addArmyToBuy(std::vector<SlotInfo> army);
 	void addArmyToBuy(std::vector<SlotInfo> army);